[p2pu-dev] Error with PIL Image module
David Beckley
beckl.d.413 at isg.edu.sa
Wed Feb 22 19:03:23 UTC 2012
Hi,
When I installed Lernanta (following the instructions in the GitHub wiki)
and ran `make syncdb`, I got this error message:
Unhandled exception in thread started by <bound method
Command.inner_run of <django.core.management.commands.runserver.Command
object at 0x8ad5fcc>>
Traceback (most recent call last):
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
line 88, in inner_run
self.validate(display_num_errors=True)
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/base.py",
line 249, in validate
num_errors = get_validation_errors(s, app)
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/core/management/validation.py",
line 35, in get_validation_errors
for (app_name, error) in get_app_errors().items():
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
line 146, in get_app_errors
self._populate()
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
line 64, in _populate
self.load_app(app_name)
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/db/models/loading.py",
line 78, in load_app
models = import_module('.models', app_name)
File
"/home/david/.virtualenvs/lernanta/local/lib/python2.7/site-packages/django/utils/importlib.py",
line 35, in import_module
__import__(name)
File
"/home/david/gitRepos/lernanta/lernanta/../lernanta/apps/users/models.py",
line 22, in <module>
from drumbeat import storage
File
"/home/david/gitRepos/lernanta/lernanta/apps/drumbeat/storage.py", line 2,
in <module>
import Image
ImportError: No module named Image
I updated PIL with the command pip install PIL --upgrade, but the same
error occurred.
Since the line `import Image` was causing the error, I found a list of all
the files containing this with grep:
- lernanta/apps/drumbeat/storage.py
- lernanta/apps/projects/tasks.py
- lernanta/apps/projects/utils.py
Then, I changed `import Image` to `from PIL import Image` in each of these
files. `make syncdb` ran perfectly, as well as `python manage.py runserver`.
I am wondering why these changes were necessary. In case it has to do with
my environment, I am running Python 2.7.1+ on Ubuntu 11.04, following the
instructions on the GitHub wiki.
Everything seems to be working fine... I'm just nervous that it might blow
up sooner or later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.p2pu.org/pipermail/p2pu-dev/attachments/20120222/fed99e2c/attachment.html>
More information about the p2pu-dev
mailing list