Skip to content

Invalid requirement: '\x00'Β #442

Open
@dan-danciu

Description

@dan-danciu

I ended up following this this to the letter on two different PCs:
https://serverless.com/blog/serverless-python-packaging/

But I still get the same error everywhere:


  Error --------------------------------------------------                                                                            
                                                                                                                                      
  Error: STDOUT:                                                                                                                      
                                                                                                                                      
  STDERR: ERROR: Invalid requirement: '\x00' (from line 1 of /var/task/requirements.txt)                                              
                                                                                                                                 
      at D:\git\numpy-test\node_modules\serverless-python-requirements\lib\pip.js:320:13                                              
      at Array.forEach (<anonymous>)                                                                                                  
      at installRequirements (D:\git\numpy-test\node_modules\serverless-python- 
 requirements\lib\pip.js:307:28)                        
      at installRequirementsIfNeeded (D:\git\numpy-test\node_modules\serverless-python- 
 requirements\lib\pip.js:551:3)                 
      at ServerlessPythonRequirements.installAllRequirements (D:\git\numpy- 
 test\node_modules\serverless-python-requirements\lib\pip.js
  :630:29)                                                                                                                              
      at ServerlessPythonRequirements.tryCatcher (D:\git\numpy- 
 test\node_modules\bluebird\js\release\util.js:16:23)                   
      at Promise._settlePromiseFromHandler (D:\git\numpy- 
 test\node_modules\bluebird\js\release\promise.js:547:31)                     
      at Promise._settlePromise (D:\git\numpy- 
 test\node_modules\bluebird\js\release\promise.js:604:18)                                
      at Promise._settlePromise0 (D:\git\numpy- 
 test\node_modules\bluebird\js\release\promise.js:649:10)                               
      at Promise._settlePromises (D:\git\numpy- 
 test\node_modules\bluebird\js\release\promise.js:729:18)                               
      at _drainQueueStep (D:\git\numpy-test\node_modules\bluebird\js\release\async.js:93:12)                                          
      at _drainQueue (D:\git\numpy-test\node_modules\bluebird\js\release\async.js:86:9)                                               
      at Async._drainQueues (D:\git\numpy-test\node_modules\bluebird\js\release\async.js:102:5)                                       
      at Immediate.Async.drainQueues [as _onImmediate] (D:\git\numpy- 
 test\node_modules\bluebird\js\release\async.js:15:14)            
      at processImmediate (internal/timers.js:439:21)                                                                                 
      at process.topLevelDomainCallback (domain.js:131:23)                                                                            
                                                                                                                                      
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.                                              

The requirements.txt is absolutely fine in my project root folder but when I look at it in the .serverless folder it looks completely messed up:

root:
image

.serverless:
image

I can not replace it as the plugin copies it every time serverless tries to package the thing so what am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions