django - Heroku: string without NULL bytes with several requirements files -
i'm trying deploy django web application in heroku ubuntu following "two scoops of django 1.6" project structure.
after doing heroku create, run git push heroku master , output attached @ end.
i googled extensively , i'm aware error this
typeerror: must encoded string without null bytes, not str
and caused because encoding or rare characters in requirements files. problem tried saving less dependencies , changing encodings in files , achieved nothing (i don't know valid encodings heroku, i'm blind @ this).
i'm looking way of finding null characters, cat -e @ command line, can't find anything. i'm asking way finding encoding problem or wrong dependency.
thank in advanced.
edit: tried doing pip
install -r <filename>.txt
with several of requirements txt files. installations fine. tried doing git push heroku master commented in main requirements.txt (an empty file) , keeps giving same error. maybe heroku not picking requirements.txt file???
i tried re-creating files command line , typing manually same content (not copy-paste). same error keeps appearing. :-(
files , output:
my requirements files are:
requirements.txt (at root of project):
# file here because many platforms service # requirements.txt in root directory of project. -r requirements/production.txt
requirements/production.txt:
# pro-tip: try not put here. there should no dependency in # production isn't in development. -r base.txt gunicorn==18.0
and requirements/base.txt:
django==1.7 psycopg2==2.6 sqlparse==0.1.15 django-debug-toolbar==1.3.0 html5lib==0.999 pillow==2.8.1 pypdf2==1.24 reportlab==3.1.44 six==1.9.0 xhtml2pdf==0.0.6
the output:
pushing https://git.heroku.com/tranquil-cliffs-3699.git post git-receive-pack (chunked) remote: compressing source files... done. remote: building source: remote: remote: -----> python app detected remote: -----> installing runtime (python-2.7.10) remote: -----> installing dependencies pip remote: exception: remote: traceback (most recent call last): remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/basecommand.py", line 223, in main remote: status = self.run(options, args) remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/commands/install.py", line 268, in run remote: wheel_cache remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/basecommand.py", line 287, in populate_requirement_set remote: wheel_cache=wheel_cache): remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 86, in parse_requirements remote: req in req_iter: remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 161, in process_line remote: req in parser: remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 86, in parse_requirements remote: req in req_iter: remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 161, in process_line remote: req in parser: remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 86, in parse_requirements remote: req in req_iter: remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_file.py", line 130, in process_line remote: wheel_cache=wheel_cache remote: file "/app/.heroku/python/lib/python2.7/site-packages/pip-7.0.1-py2.7.egg/pip/req/req_install.py", line 162, in from_line remote: if (os.path.isdir(p) , remote: file "/app/.heroku/python/lib/python2.7/genericpath.py", line 49, in isdir[k remote: st = os.stat(s) remote: typeerror: must encoded string without null bytes, not str remote: remote: remote: ! push rejected, failed compile python app remote: remote: verifying deploy... remote: remote: ! push rejected tranquil-cliffs-3699. remote: https://git.heroku.com/tranquil-cliffs-3699.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed push refs 'https://git.heroku.com/tranquil-cliffs-3699.git'
it fault. super-newbie stupid error. not making git commit after each edit, pushing same wrong files heroku.
now realized, , when pushing error has changed one.
thanks lot , sorry making lose time.
Comments
Post a Comment