python - Heroku and Django -



python - Heroku and Django -

i'm trying follow tutorial: http://tutorial.djangogirls.org/en/index.html

i'm part: http://tutorial.djangogirls.org/en/deploy/readme.html

where force heroku via git. i'm familiar git not heroku , while know python i'm django beginner.

when command git force heroku master output prevents app beingness deployed.

here error receiving:

(myvenv) $> git force heroku master counting objects: 19, done. delta compression using 8 threads. compressing objects: 100% (16/16), done. writing objects: 100% (19/19), 3.81 kib | 0 bytes/s, done. total 19 (delta 0), reused 0 (delta 0) remote: compressing source files... done. remote: building source: remote: remote: -----> python app detected remote: -----> installing runtime (python-3.4.1) remote: -----> installing dependencies pip remote: exception: remote: traceback (most recent phone call last): remote: file "/app/.heroku/python/lib/python3.4/site-packages/pip- 6.0.6-py3.4.egg/pip/basecommand.py", lin , in main remote: status = self.run(options, args) remote: file "/app/.heroku/python/lib/python3.4/site-packages/pip- 6.0.6-py3.4.egg/pip/commands/install.py" e 321, in run remote: finder=finder, options=options, session=session): remote: file "/app/.heroku/python/lib/python3.4/site-packages/pip-6.0.6-py3.4.egg/pip/req/req_file.py", li , in parse_requirements remote: session=session, remote: file "/app/.heroku/python/lib/python3.4/site-packages/pip- 6.0.6-py3.4.egg/pip/download.py", line 4 n get_file_content remote: content = f.read() remote: file "/app/.heroku/python/lib/python3.4/codecs.py", line 313, in decode remote: (result, consumed) = self._buffer_decode(data, self.errors, final) remote: unicodedecodeerror: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte remote: remote: remote: ! force rejected, failed compile python app remote: remote: verifying deploy... remote: remote: ! force rejected chsdjangoblog. remote: https://git.heroku.com/chsdjangoblog.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed force refs 'https://git.heroku.com/chsdjangoblog.git'

does have thought why occurring? heroku seems nice use, there improve alternative/what best utilize cases heroku? want solve issue can go on tutorial. learning django has been goal of mine while i'm sick of word press , php development , have been long time python lover.

after error when seek next step: heroku ps:scale web=1 output:

scaling dynos... failed ! app mus tbe deployed before dynos can scaled.

thanks in advance.

edit:

here's requirements.txt:

django==1.8 dj-database-url==0.3.0 gunicorn==19.3.0 heroku==0.1.4 python-dateutil==1.5 requests==2.6.0 whitenoise==1.0.6 psycopg2==2.5.4`

i have tried saving utf-8, ansi, utf-16. same message of them. rewrote without re-create paste. why first byte 0xff regardless of encoding? heroku expecting , there way/tool check bytes in txt file?

on shoulders of other contributors question, looks requirements.txt file encoded utf-16 little endian.

0xff first character of byte order mark utf-16-le, sec character beingness 0xfe. traceback states first character 0xff in position 0, , mutual in windows files stored utf-16 bom.

try saving requirements.txt file utf-8 without bom, or ascii. simple old notepad.exe might trick.

edit

not working in notepad, utilize python 3 instead:

with open('requirements.txt', encoding='utf-16') old, open('requirements_new.txt', 'w', encoding='utf-8') new: new.write(old.read())

requirements_new.txt encoded utf-8 , should work (it end ascii anyway).

note based on comments , answers of others have suggested troublesome file requirements.txt.

python django git heroku

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -