我将我的webapp应用到heroku时遇到问题。一年前,其他用户遇到了类似的问题:deploying flask app to heroku error但是,提供的解决方案对我不起作用。还有其他想法吗?非常感谢帮助。 先谢谢。
这是我的日志:
-----> Python app detected
-----> Installing python-3.6.5
-----> Installing pip
-----> Installing requirements with pip
Exception:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/app/.heroku/python/lib/python3.6/site-packages/pip/commands/install.py", line 312, in run
wheel_cache
File "/app/.heroku/python/lib/python3.6/site-packages/pip/basecommand.py", line 295, in populate_requirement_set
wheel_cache=wheel_cache):
File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_file.py", line 93, in parse_requirements
for req in req_iter:
File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_file.py", line 158, in process_line
isolated=isolated, options=req_options, wheel_cache=wheel_cache
File "/app/.heroku/python/lib/python3.6/site-packages/pip/req/req_install.py", line 195, in from_line
if (os.path.isdir(p) and
File "/app/.heroku/python/lib/python3.6/genericpath.py", line 42, in isdir
st = os.stat(s)
ValueError: embedded null byte
! Push rejected, failed to compile Python app.
! Push failed
答案 0 :(得分:0)
您似乎在\x00
中的某处嵌入了空字节(requirements.txt
)。