Here’s a revised patch. The previous patch addresses the issue with commands, but I needed some additional things to get things up and running with py2exe.
If it helps, you can download the installer of my application at http://sourceforge.net/projects/frepple/files/ and browse all source code at https://github.com/jdetaeye/frePPLe Johan From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Antonio Francisco Martín Romero Sent: Thursday, April 10, 2014 5:46 PM To: django-users@googlegroups.com Subject: Re: py2exe + Django 1.6 Thank you very much. I can see the commands but I get an error when I try to run one. I have attached my manage.py file. See below the errors >manage.exe shell Traceback (most recent call last): File "manage.py", line 28, in <module> File "django\core\management\__init__.pyc", line 365, in execute_from_command_ line File "django\core\management\__init__.pyc", line 358, in execute File "django\core\management\base.pyc", line 242, in run_from_argv File "django\core\management\base.pyc", line 280, in execute File "django\utils\translation\__init__.pyc", line 130, in activate File "django\utils\translation\trans_real.pyc", line 188, in activate File "django\utils\translation\trans_real.pyc", line 178, in translation File "django\utils\translation\trans_real.pyc", line 146, in _fetch AttributeError: 'NoneType' object has no attribute '_info' Cheers On Thursday, April 10, 2014 2:29:38 PM UTC+1, johan de taeye wrote: This is very old issue in Django: see ticket https://code.djangoproject.com/ticket/8280 I've attached the patch I'm already using for years to package my django application with py2exe. I don't understand why the core team continues to use the current un-pythonic code to discover commands and fails to merge any of the fixes that have been proposed. Johan Op donderdag 10 april 2014 14:19:19 UTC+2 schreef Antonio Francisco Martín Romero: Hi everyone, I was using py2exe + Django 1.3 without problems. From Django 1.4 the way to find the commands changed and it tries to find .py files as you can see in the find_commands() function in the file core/management/__init__.py . When you compile Django using py2exe, your don't have .py files, just .pyc and manage.exe won't have any command. I have tried to modify the find_command() function but the result was negative. Also, I have tried to run commands manually but the functions try to find .py files as well. Did anyone manage to do it? Cheers -- You received this message because you are subscribed to a topic in the Google Groups "Django users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/dRQ8owj0myU/unsubscribe. To unsubscribe from this group and all its topics, send an email to django-users+unsubscr...@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/22a72b73-76a0-4730-bbf8-2c1e0d79bee8%40googlegroups.com <https://groups.google.com/d/msgid/django-users/22a72b73-76a0-4730-bbf8-2c1e0d79bee8%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- 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+unsubscr...@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/00c101cf54dc%24686dd340%24394979c0%24%40gmail.com. For more options, visit https://groups.google.com/d/optout.
django_py2exe.patch
Description: Binary data