johnmnemonik / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

plinit crash when adding effect to already existing admin thumbnail settings #128

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create project without running plinit
2. create your admin thumbnails
3. run plinit, do not replace admin thumbnails, and add effects

What is the expected output? What do you see instead?

\plinit.py", line 20, in init
    admin_thumbnail.effect = effect
AttributeError: 'NoneType' object has no attribute 'effect'

What version of the product are you using? On what operating system?

(2, 2) - WinXP

Please provide any additional information below.

python manage.py plinit

Photologue requires a specific photo size to display thumbnail previews in
the Django admin applicat
ion.
Would you like to generate this size now? (yes, no):yes
A "admin_thumbnail" photo size already exists. Do you want to replace it?
(yes, no):no
Would you like to apply a sample enhancement effect to your admin
thumbnails? (yes, no):yes
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
line 340, in execute_mana
ger
    utility.execute()
  File "C:\Python25\lib\site-packages\django\core\management\__init__.py",
line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line
192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\Python25\lib\site-packages\django\core\management\base.py", line
219, in execute
    output = self.handle(*args, **options)
  File
"C:\Python25\Lib\site-packages\photologue\management\commands\plinit.py",
line 11, in handle
    return init(*args, **kwargs)
  File
"C:\Python25\Lib\site-packages\photologue\management\commands\plinit.py",
line 20, in init
    admin_thumbnail.effect = effect
AttributeError: 'NoneType' object has no attribute 'effect'

Original issue reported on code.google.com by joseb...@gmail.com on 20 Aug 2009 at 5:08

GoogleCodeExporter commented 8 years ago
I got the same:

Photologue requires a specific photo size to display thumbnail previews in the 
Django
admin application.
Would you like to generate this size now? (yes, no):yes
A "admin_thumbnail" photo size already exists. Do you want to replace it? (yes, 
no):no
Would you like to apply a sample enhancement effect to your admin thumbnails? 
(yes,
no):yes
Traceback (most recent call last):
  File "manage.py", line 27, in <module>
    execute_from_command_line()
  File "C:\django-trunk\django\core\management\__init__.py", line 430, in
execute_from_command_line
    utility.execute()
  File "C:\django-trunk\django\core\management\__init__.py", line 380, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\django-trunk\django\core\management\base.py", line 195, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "C:\django-trunk\django\core\management\base.py", line 222, in execute
    output = self.handle(*args, **options)
  File "C:\test\apps\photologue\management\commands\plinit.py", line 11, in handle
    return init(*args, **kwargs)
  File "C:\test\apps\photologue\management\commands\plinit.py", line 20, in init
    admin_thumbnail.effect = effect
AttributeError: 'NoneType' object has no attribute 'effect'

Original comment by frank.x....@gmail.com on 12 Dec 2009 at 8:07

GoogleCodeExporter commented 8 years ago
A temp fix for this is to move the folder res/ into the installation of 
Photologue -- I found this folder inside the Photologue install files. Delete 
the offending PhotoSize -- admin_thumbnail, thumbnail, and details. Then rerun 
./manage.py plinit.

Didn't find it documented anywhere so I thought it might help those who 
experience this.

Original comment by derek.ro...@gmail.com on 10 Jun 2010 at 3:30