问题
I am using scrapy 0.20 on Python 2.7.
I want to deploy my scrapy project on scrapy cloud
- I developed my scrapy project with simple spider.
- navigate to my scrapy project folder.
- typed
scrapy deploy scrapyd -d koooraspider
on cmd. Wherekoooraspider
is my project's name, andscrapyd
is my target.
I got the following error:
D:\Walid-Project\Tasks\koooraspider>scrapy deploy scrapyd -p koooraspider
Packing version 1395847344
Deploying to project "koooraspider" in http://dash.scrapinghub.com/api/scrapyd/a
ddversion.json
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\cmdline.py"
, line 168, in <module>
execute()
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\cmdline.py"
, line 143, in execute
_run_print_help(parser, _run_command, cmd, args, opts)
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\cmdline.py"
, line 89, in _run_print_help
func(*a, **kw)
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\cmdline.py"
, line 150, in _run_command
cmd.run(args, opts)
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\commands\de
ploy.py", line 105, in run
if not _upload_egg(target, egg, project, version):
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\commands\de
ploy.py", line 194, in _upload_egg
return _http_post(req)
File "C:\Python27\lib\site-packages\scrapy-0.20.2-py2.7.egg\scrapy\commands\de
ploy.py", line 210, in _http_post
f = urllib2.urlopen(request)
File "C:\Python27\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 391, in open
response = self._open(req, data)
File "C:\Python27\lib\urllib2.py", line 409, in _open
'_open', req)
File "C:\Python27\lib\urllib2.py", line 369, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 1173, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python27\lib\urllib2.py", line 1142, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "C:\Python27\lib\httplib.py", line 946, in request
self._send_request(method, url, body, headers)
File "C:\Python27\lib\httplib.py", line 987, in _send_request
self.endheaders(body)
File "C:\Python27\lib\httplib.py", line 940, in endheaders
self._send_output(message_body)
File "C:\Python27\lib\httplib.py", line 801, in _send_output
msg += message_body
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 373: ordina
l not in range(128)
scrapy.cfg
# Project: KoooraSpider
[deploy:scrapyd]
url = http://dash.scrapinghub.com/api/scrapyd/
username = MyUserName
password =
project = 2431
Note
When I did the previous steps, project.egg-info
folder, build
folder, and setup.py
script have been generated.
Any help will be appreciated.
回答1:
remove project.egg-info
& build
folders
and then try command scrapy deploy scrapyd -p 2431
来源:https://stackoverflow.com/questions/22665819/error-when-deploying-scrapy-project-on-the-scrapy-cloud