-
Notifications
You must be signed in to change notification settings - Fork 293
Deploy fails: ValueError: embedded null byte #226
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
Comments
We don't have any Windows dev boxes, but I wasn't able to recreate this on linux or mac. Here's what I ran:
|
Thanks. Following your steps I successfully packaged a new project. I copied the cat created requirements.txt to the original project and successfully packaged that project. |
Glad you got it working! 👍 |
I had this same problem today. After spending a lot of time trying to understand what was really happening I finally found out that the requirements.txt was been saved with UTF16 encoding (probably due to me running Hope this information can help the next person that stumbles into this problem. |
Works perfectly! Thanks. |
When I saved with UTF8 this way from windows 10 powershell in my virtualenv it saved as UTF8 with BOM and then I would get following error when deploying with AWS codebuild on standard ubuntu 2.0 image: I put cat requirements.txt into my codebuild project and then realized it was saving with a BOM of · from powershell I was able to resolve this error by opening the requirements.txt file and using vscode with save as encoding: utf8 (without bom) |
I got this error because my |
When I try to deploy I get an "embedded null byte" error. It appears null bytes are inserted when the serverless-python-requirements plugin copies the requirements.txt file to the .serverless directory.
I'm running the latest version of the serverless-python-requirements plugin.
Docker version 18.06.0-ce, build 0ffa825
Contents of ./.serverless/requirements.txt

Contents of ./requirements.txt
I get the same error on my macos box too. The function works when invoked locally.
I'd appreciate help getting to the bottom of this.
The text was updated successfully, but these errors were encountered: