我正在尝试从命令行访问在aws ec2实例上运行的neo4j,在那里我收到授权错误.我已经启用org.neo4j.server.webserver.address=0.0.0.0并在第一个语句上获得503错误,并使用ec2主机名获得相同的错误.
ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/
{
"management" : "http://localhost:7474/db/manage/",
"data" : "http://localhost:7474/db/data/"
}ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/db/data/
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
}ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/user/neo4j/
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
ubuntu@ip-10-0-0-192:/etc/neo4j$ curl http://localhost:7474/user/neo4j/password
{
"errors" : [ {
"message" : "No authorization header supplied.",
"code" : "Neo.ClientError.Security.AuthorizationFailed"
} ]
Run Code Online (Sandbox Code Playgroud)
我是否正确登录或者我错过了某个地方?
任何帮助表示赞赏.
我收到此错误UnicodeEncodeError:'latin-1'编解码器无法编码字符u'\ u2014'
我正在尝试将大量新闻文章加载到MySQLdb中.但是我在处理非标准字符时遇到困难,我为各种字符收到了数百个错误.我可以使用.replace()单独处理它们,虽然我想要一个更完整的解决方案来正确处理它们.
ubuntu@ip-10-0-0-21:~/scripts/work$ python test_db_load_error.py
Traceback (most recent call last):
File "test_db_load_error.py", line 27, in <module>
cursor.execute(sql_load)
File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 157, in execute
query = query.encode(charset)
UnicodeEncodeError: 'latin-1' codec can't encode character u'\u2014' in position 158: ordinal not in range(256)
Run Code Online (Sandbox Code Playgroud)
我的剧本;
import MySQLdb as mdb
from goose import Goose
import string
import datetime
host = 'rds.amazonaws.com'
user = 'news'
password = 'xxxxxxx'
db_name = 'news_reader'
conn = mdb.connect(host, user, password, db_name)
url = 'http://www.dailymail.co.uk/wires/ap/article-3060183/Andrew-Lesnie-Lord-Rings-cinematographer-dies.html?ITO=1490&ns_mchannel=rss&ns_campaign=1490'
g = Goose()
article = …Run Code Online (Sandbox Code Playgroud)