Closed decentral1se closed 8 years ago
Hey @lwm!
Did you install django-rules
or rules
?
If you ran $ pip install django-rules
, the 0.2 of django-rules
will install into your python path. The 0.2 release doesn't have a 'apps.py' module (relevant code link here). Post the 0.2 release, the from-pip installation command changed to: $ pip install rules
(note the lack of django-
prior to rules
). If you run that it'll install version 1.1.1 (the latest release) and will work as expected.
Here's the TL;DR fix:
$ pip uninstall django-rules
$ pip install rules
Hey @respondcreate, thanks for quick response.
Unfortunately, this isn't working, as I am running on rules=1.1.1
version and this still blows up.
lwm$ pip uninstall django-rules
Cannot uninstall requirement django-rules, not installed
Storing debug log for failure in /home/lwm/.pip/pip.log
(.venv) ruby-2.2.1 ~/velodrome (versatile-image) [05:10:26]
lwm$ pip install rules
Requirement already satisfied (use --upgrade to upgrade): rules in ./.venv/lib/python3.4/site-packages
Cleaning up...
(.venv) ruby-2.2.1 ~/velodrome (versatile-image) [05:10:29]
lwm$ pip install rules --upgrade
Requirement already up-to-date: rules in ./.venv/lib/python3.4/site-packages
Cleaning up...
Any other ideas?
Hey @lwm –
I think I figured out the source of the issue. I was able to reproduce & fix it locally, would you mind installing the code I wrote on this bug fix branch and then test it on your end as well? Here's how to get it:
$ pip uninstall django-versatileimagefield
$ pip install https://github.com/WGBH/django-versatileimagefield/archive/autodiscover-bug-34.zip
If it fixes things on your end as well then I'll merge it into master and do a official release to PyPI.
Thanks for your patience!
Awesome, that worked for me, thanks :+1: :rocket:
Hey @lwm–
The fix for this is available in the 1.2.2 release which I just uploaded to PyPI. Get it via pip:
$ pip install django-versatileimagefield==1.2.2
Thanks so much for your contribution to this project! :)
Hi there, not sure if this is a problem in
django-versatileimagefield
ordjango-rules
, but I don't really understand what is happening, so I will start here :+1:I have a
'rules.apps.AutodiscoverRulesConfig'
(docs) line in myINSTALLED_APPS
which is somedjango-rules
specific configuration for discovering my rules. However, your implementation ofautodiscover()
will callimport_module
and blow up when it can't import theAutodiscoverRulesConfig
.Any ideas what the fix should be?
The error I am seeing is below.