question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error when deploying !!!

See original GitHub issue

when I was deploying my project, there was a error that I coudn’t resovle! error message: {“status”: “error”, “message”: “environment can only contain strings”, “node_name”: “XSOOY-PC”}

server message:

 Traceback (most recent call last):
          File "c:\program files (x86)\python27\lib\site-packages\twisted\web\http.py", line 1694, in allContentReceived
            req.requestReceived(command, path, version)
          File "c:\program files (x86)\python27\lib\site-packages\twisted\web\http.py", line 790, in requestReceived
            self.process()
          File "c:\program files (x86)\python27\lib\site-packages\twisted\web\server.py", line 189, in process
            self.render(resrc)
          File "c:\program files (x86)\python27\lib\site-packages\twisted\web\server.py", line 238, in render
            body = resrc.render(self)
        --- <exception caught here> ---
          File "c:\program files (x86)\python27\lib\site-packages\scrapyd\webservice.py", line 21, in render
            return JsonResource.render(self, txrequest).encode('utf-8')
          File "c:\program files (x86)\python27\lib\site-packages\scrapyd\utils.py", line 20, in render
            r = resource.Resource.render(self, txrequest)
          File "c:\program files (x86)\python27\lib\site-packages\twisted\web\resource.py", line 250, in render
            return m(request)
          File "c:\program files (x86)\python27\lib\site-packages\scrapyd\webservice.py", line 86, in render_POST
            spiders = get_spider_list(project, version=version)
          File "c:\program files (x86)\python27\lib\site-packages\scrapyd\utils.py", line 132, in get_spider_list
            proc = Popen(pargs, stdout=PIPE, stderr=PIPE, env=env)
          File "c:\program files (x86)\python27\lib\subprocess.py", line 390, in __init__
            errread, errwrite)
          File "c:\program files (x86)\python27\lib\subprocess.py", line 640, in _execute_child
            startupinfo)
        exceptions.TypeError: environment can only contain strings

what should I do?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
my8100commented, Oct 14, 2019

Use Python 3 or install the latest Scrapyd from git instead.

1reaction
evrn1874commented, Sep 1, 2017

@redapple ,yes it is relate to https://github.com/scrapy/scrapyd-client/issues/49 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 is the Unicode type, if in python3 it will fine, but in the python2 we must first convert unicode to str , similar to Env[‘SCRAPY_PROJECT’] = str (project) Env[‘SCRAPY_EGG_VERSION’] = str (version) then is ok

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Deployment Errors - DeployHQ
Common Deployment Errors · 452 Transfer aborted. No space left on device · 552 Disk full - please upload later · Automatic Deployments...
Read more >
Deployment errors | Apigee Edge
Any error that occurs during deployment of an API Proxy is called a Deployment error. Deployment of API proxies might fail due to...
Read more >
Package deployment errors - IBM
Deployment errors occur primarily when the configuration data in the package cannot be validated. If you cannot correct the errors that are displayed...
Read more >
Troubleshoot common Azure deployment errors
Error code Mitigation More inform... AccountNameInvalid Follow naming guidelines for storage accounts. Resolve erro... AccountPropertyCannotBeSet Check available storage account properties. storageAcco... AnotherOperationInProgress Wait for concurrent operation...
Read more >
Chapter 12. Viewing deployment errors
If an error occurs during storage deployment, the deployment process halts and Deployment failed is displayed. Deploying storage failed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found