running heroku-style Procfile causes missing wysihtml5.widgets
Closed this issue · 1 comments
Procfile that worked used python manage.py runserver "0.0.0.0:$PORT" --settings "$DJANGO_SETTINGS_MODULE"
. Everything is fine here.
Switching to Heroku-like Procfile: newrelic-admin run-program gunicorn -b 0.0.0.0:$PORT karmaworld.wsgi
. The Heroku-like Procfile causes an ImportError
importing from wysihtml5.widgets
.
As a test, removing the wysihtml5.widgets
import and replacing it with something else allows the server to run just fine using Heroku-like syntax.
The problem is a combination of Heroku-like Procfile and wysihtml5.widgets
.
Full traceback:
03:57:28 web.1 | Internal Server Error: /
03:57:28 web.1 | Traceback (most recent call last):
03:57:28 web.1 | File "/home/vagrant/karmanotes-web/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 101, in get_response
03:57:28 web.1 | resolver_match = resolver.resolve(request.path_info)
03:57:28 web.1 | File "/home/vagrant/karmanotes-web/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 338, in resolve
03:57:28 web.1 | for pattern in self.url_patterns:
03:57:28 web.1 | File "/home/vagrant/karmanotes-web/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 366, in url_patterns
03:57:28 web.1 | patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
03:57:28 web.1 | File "/home/vagrant/karmanotes-web/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 361, in urlconf_module
03:57:28 web.1 | self._urlconf_module = import_module(self.urlconf_name)
03:57:28 web.1 | File "/home/vagrant/karmanotes-web/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
03:57:28 web.1 | __import__(name)
03:57:28 web.1 | File "/vagrant/karmaworld/urls.py", line 11, in <module>
03:57:28 web.1 | from karmaworld.apps.courses.views import AboutView, flag_course, edit_course, course_list_ajax
03:57:28 web.1 | File "/vagrant/karmaworld/apps/courses/views.py", line 30, in <module>
03:57:28 web.1 | from karmaworld.apps.notes.forms import FileUploadForm
03:57:28 web.1 | File "/vagrant/karmaworld/apps/notes/forms.py", line 8, in <module>
03:57:28 web.1 | from wysihtml5.widgets import RichTextEditor
03:57:28 web.1 | ImportError: No module named wysihtml5.widgets
spawned from #415
less clean, but I moved widgets.py
from its corresponding app into the karmaworld.utils
directory. It imports fine now. Not sure why, not sure I care.