Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can fix the encoding problem:"environment can only contain strings" #49

Closed
evrn1874 opened this issue Sep 1, 2017 · 1 comment
Closed

Comments

@evrn1874
Copy link

evrn1874 commented Sep 1, 2017

environment can only contain strings
many people meet
error message:
{"status": "error", "message": "environment can only contain strings", "node_name": "XSOOY-PC"}
when deploying project
I found this problem lies in the method get_spider_list() in utils.py of scrapyd
we must make sure that the value of the env passed into the Popen is str
But in fact env['SCRAPY_PROJECT'] and env['SCRAPY_EGG_VERSION'] these two parameters from the outside into the Unicode type,
if in python3 is will fine, but in the python2 we must first convert unicode to str , similar to the
Env['SCRAPY_PROJECT'] = str (project)
Env['SCRAPY_EGG_VERSION'] = str (version)
then is ok
could fix this problem in later version? thanks~

@jpmckinney
Copy link
Contributor

This sounds like a Python 2 issue. Python 2 is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants