Thanks Brian! The out-file command with ascii encoding specified fixed this for me.
On Wednesday, September 26, 2012 1:55:31 AM UTC-4, Brian Peiris wrote:
-- On Wednesday, September 26, 2012 1:55:31 AM UTC-4, Brian Peiris wrote:
Thanks John, that was useful.
This happens because powershell outputs UTF-16 by default. Another way to fix it is by using the out-file command with an ascii encoding specified:
pip freeze | out-file -enc ascii requirements.txt
On Sunday, March 11, 2012 4:17:59 AM UTC-4, John W. wrote:I know it's weird to reply to myself, but just in case that somebody has the same problem.It seems that the problem it is in the requirements.txt, i created it using powershell and "pip.exe freeze > requirements.txt" command,which creates a file with a name that has nullbytes in it.I was able to get around this problem by downloading a requirements.txt from an example project on github and modifying it.That did the job and everything works nice.
On Saturday, March 10, 2012 6:06:23 PM UTC+2, John W. wrote:Hi. I want to deploy a Django project on Heroku. The logic it's straightforward : create a virtualenv, install django, some other stuff, pip freeze into requirements.txt, create a git repository and git push it to project's repository. From what i've seen it seems like the service downloads the project and install virtualenv and pip on virtual server and it uses pip to install dependencies listed in requirments.txt . While pushing to remote server it looks like everything goes nicely until pip starts to install dependencies and then a error happens. I'm new to pip so maybe someone already seen this error. Thank you in advance.Console snapshot:ψ pip.exe freeze
Django==1.3.1
distribute==0.6.24
versiontools==1.8.3
(venv)
ψ more .\requirements.txt
Django==1.3.1
distribute==0.6.24
versiontools==1.8.3
(venv)
ψ git push heroku master
Enter passphrase for key '/c/Program Files (x86)/Vim/.ssh/id_rsa':
Counting objects: 12, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (12/12), 3.30 KiB, done.
Total 12 (delta 2), reused 0 (delta 0)
-----> Heroku receiving push
-----> Python/Django app detected
-----> Preparing virtualenv version 1.7
New python executable in ./bin/python
Installing distribute.................................................. done............................... .............................. .............................. .............................. ...................
Installing pip...............done.
-----> Activating virtualenv
-----> Installing dependencies using pip version 1.0.2
Exception:
Traceback (most recent call last):
File "/tmp/build_k6zl66ydgqxp/lib/python2.7/site-packages/pip-1. , line 126, in main0.2-py2.7.egg/pip/basecommand. py"
self.run(options, args)
File "/tmp/build_k6zl66ydgqxp/lib/python2.7/site-packages/pip-1. , line 200, in run0.2-py2.7.egg/pip/commands/ install.py"
for req in parse_requirements(filename, finder=finder, options=options):
File "/tmp/build_k6zl66ydgqxp/lib/python2.7/site-packages/pip-1. , line 1255, in parse_requirements0.2-py2.7.egg/pip/req.py"
req = InstallRequirement.from_line(line , comes_from)
File "/tmp/build_k6zl66ydgqxp/lib/python2.7/site-packages/pip-1. , line 82, in from_line0.2-py2.7.egg/pip/req.py"
elif os.path.isdir(path) and (os.path.sep in name or name.startswith('.')):
File "/tmp/build_k6zl66ydgqxp/lib/python2.7/genericpath.py" , line 41, in isdir
st = os.stat(s)
TypeError: must be encoded string without NULL bytes, not str
Storing complete log in /app/.pip/pip.log! Heroku push rejected, failed to compile Python/django app
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f19ea0d9-f0d0-4f13-9b45-e3df2de2b10d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment