Error_log following upgrade to v1.10.X

152 views
Skip to first unread message

SteveD

unread,
Apr 29, 2013, 2:25:51 PM4/29/13
to miro-communit...@googlegroups.com
There are three persistent entries in my error_log that I'd appreciate some help in debugging.  My v1.10.X test site is up and running here - http://player.skiddmark.com and I'm using our original MySQL database with 60,000 video items.

Error 1: As you can see from the site, the URLs for the image thumbs are along the lines of "/thumbs/adjust/localtv/video/thumbnail/2013/04/28/f6aa5bd1c7ec0945efcdjpeg?a=fill&h=216&s=7b7e39e5d8a58a876157&w=300".  The actual location of the images (after running python manage.py update_thumbnails) is "/media/localtv/..."

MEDIA_ROOT and MEDIA_URL in my settings.py are declared as "/opt/virtual-env/skidd_project/media/" and "http://player.skiddmark.com/media/"

Any ideas why its appending "/thumbs/adjust" rather than "/media"?

Error 2: Nose plugin.  The following error is displayed in my error_log or when collectstatic is run:

[Mon Apr 29 18:47:14 2013] [error] /opt/virtual-env/mc/lib/python2.7/site-packages/nose/plugins/manager.py:395: RuntimeWarning: Unable to load plugin noseprogressive = noseprogressive:ProgressiveP$
[Mon Apr 29 18:47:14 2013] [error]   RuntimeWarning)

Is this likely to be a configuration error, or a bug in 1.10.X?

Error 3:  I suspect this is related to Error 1, but the app seems to expect a directory structure in MEDIA_ROOT.  If I manually create the directory name which is causing the 'File does not exist' error, then next time I load the page, it will generate an error further along the directory tree.  This suggests to me its lacking the necessary permissions to create the directory even though the user/group permissions are the same on the /media folder as they are for /static, which worked fine when I ran Collectstatic.

Here are some sample error lines:

[Mon Apr 29 16:40:52 2013] [error] [client 86.138.206.220] File does not exist: /opt/virtual-env/skidd_project/media/localtv/sitesettings, referer: http://player.skiddmark.com/

I then manually created 'sitesettings', and when I re-loaded the page it generated the following error:

[Mon Apr 29 16:42:08 2013] [error] [client 86.138.206.220] File does not exist: /opt/virtual-env/skidd_project/media/localtv/sitesettings/background, referer: http://player.skiddmark.com/

I then manually created 'background', and so the error moves along the directory tree..

[Mon Apr 29 16:43:30 2013] [error] [client 86.138.206.220] File does not exist: /opt/virtual-env/skidd_project/media/localtv/sitesettings/background/2012, referer: http://player.skiddmark.com/

Is there a manage.py command that I need to run to bring my file structure in line with my database? Or is the problem arising because the new ImageField functionality was never built to handle archived data?

Stephen Burrows

unread,
Apr 30, 2013, 8:21:03 AM4/30/13
to miro-communit...@googlegroups.com
Error 1: It sounds like your versions of 1.10.X and Daguerre are out of date. The '/thumbs/' URLs are generated by daguerre. In the version you're using, daguerre always generates '/thumbs/' URLs, even if the resized version already exists. There's also a tell-tale bug which causes the 'jpeg' extension to be added directly to the filename instead of being added as an extension. Upgrading daguerre to commit 58686eb67172b2cbdf050519e0b8143b364f2652 [1] should solve this.

Error 2: It looks like part of the error message is missing. This is not a known bug in 1.10.X, but it sounds more like a bug in nose or noseprogressive.

Error 3: This one depends on your server configuration. What are the permissions on the media folder? Which user is the web server running as? (It's often www.) Which user did you run collectstatic as?




--
You received this message because you are subscribed to the Google Groups "Miro Community Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-deve...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

SteveD

unread,
Apr 30, 2013, 8:35:54 AM4/30/13
to miro-communit...@googlegroups.com
That's very strange if Daguerre is out of date.  This was a clean server which I then installed the latest MC branch on over the weekend, so I ran "
pip install -e git+git://github.com/pculture/mirocomm...@1.10.X#egg=mirocommunity --no-deps" and then "pip install -r requirements.txt"

I had assumed that would install the latest branch of MC and its dependencies. Should I have specified a specific version of the requirements file?

As for permissions, the media folder has the same specific permissions that I use for the project and app folders, namely skiddman:skiddman, but I've tried several variations, root:apache, apache:apache to no avail. When collectstatic runs it manages to mkdir new folders in the /static directory, so I am surprised there would be any difference with the /media folder, especially when they're under the same parent 'skidd_project' and use the same permissions.
To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-development+unsub...@googlegroups.com.

Stephen Burrows

unread,
Apr 30, 2013, 9:28:31 AM4/30/13
to miro-communit...@googlegroups.com
It turns out that the version of daguerre listed in the test project requirements was out of date. The most recent commit for daguerre is actually e068e2a7ff4baff75765bcea2f06240ba39ac0ea. I've pushed a commit which corrects the test project's requirements file. You should be able to update your environment with:

pip install -e git+git://github.com/oberlin/django-daguerre.git@e068e2a7ff4baff75765bcea2f06240ba39ac0ea#egg=django-daguerre

Looking back over the Error 3 that you mentioned - it sounds like the problem is with trying to *read* files that don't exist, not write them. For example, it sounds like the file which is ostensibly your SiteSettings thumbnail doesn't actually exist on disk. If upgrading to the latest Daguerre and re-uploading your SiteSettings thumbnail doesn't resolve the issue, perhaps you could give more details on this issue - what URLs you're accessing, maybe a traceback.

--Stephen


To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-deve...@googlegroups.com.

SteveD

unread,
Apr 30, 2013, 10:22:30 AM4/30/13
to miro-communit...@googlegroups.com
Thanks Stephen, well it's good to know that I'm not talking complete nonsense.  I'll upgrade Daguerre, recheck the permissions and let you know what I find.

Surely, if the Error 3 issues arise from trying to read something that isn't there, this is because my data is out of sync with the current ImageField format?  Because all my videos were originally stored using the previous thumbnail process. 

If that's true, then how can I generate the additional meta data which is needed?  Or would you expect it to populate these folders once I re-run update_thumbails.py with the latest version of Daguerre?

Steve
To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-development+unsubsc...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stephen Burrows

unread,
Apr 30, 2013, 10:27:54 AM4/30/13
to miro-communit...@googlegroups.com
Hi, Steve,

The update_thumbnails management command only handles downloading video thumbnails from remote servers; it doesn't handle resizing of thumbnails, and it doesn't handle thumbnails for anything except videos. Additionally, Error 3 seems to be related to your SiteSettings thumbnail - your site logo - not to the thumbnails for any of your videos.

I do think that your database is out of sync with your filesystem, but I don't know when that happened. I don't know, for example, whether we ever gave you a dump of your files to go with your database. I suspect we didn't, because most of the files (video thumbnails) can be (relatively) easily re-fetched, and the remaining few (site settings thumbnail, for example) should be easy to re-upload through the admin.

--Stephen


To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-deve...@googlegroups.com.

SteveD

unread,
Apr 30, 2013, 11:47:37 AM4/30/13
to miro-communit...@googlegroups.com
No, you never provided me with a dump of our files to go with the database, but I'm happy enough with re-fetching these.   I just need to figure out an easy way of checking that our current database is now in sync.

You've provided some useful suggestions (incl. the sitesettings thumbnail), so I'll spend a few hours applying these fixes and let you know the result.

Thanks.

Stephen Burrows

unread,
May 3, 2013, 7:55:31 PM5/3/13
to miro-communit...@googlegroups.com
Any success here?


To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-deve...@googlegroups.com.

SteveD

unread,
May 5, 2013, 2:27:07 PM5/5/13
to miro-communit...@googlegroups.com
Hi Stephen, I updated daguerre, rebuilt python from the latest tarball and then deleted the folders within /media/daguerre/adjusted and /media/localtv/thumbnails. 

I then checked that curses was compiled as a dependency (which is now is).

Ran collecstatic again (which worked fine, adding 11 new files from daguerre).

Ran update_index (which completed without errors).

Then ran update_thumbnails to rebuild the /media folders.  Unfortunately with the same outcome - thumbnails are not displayed, 'jpeg' is still included in the filename rather than as an extension and now my error_log shows the following exceptions:

[Sun May 05 15:03:19 2013] [error] Exception AttributeError: "'NoneType' object has no attribute 'clear'" in <bound method OrderedDict.__del__ of OrderedDict()> ignored
[Sun May 05 15:03:19 2013] [error] Exception AttributeError: "'NoneType' object has no attribute 'clear'" in <bound method OrderedDict.__del__ of OrderedDict()> ignored
[Sun May 05 15:03:19 2013] [error] Exception AttributeError: "'NoneType' object has no attribute 'clear'" in <bound method OrderedDict.__del__ of OrderedDict()> ignored
[Sun May 05 15:03:19 2013] [error] Exception AttributeError: "'NoneType' object has no attribute 'clear'" in

I will try cleaning the MEDIA_ROOT again, this time starting with a completely empty /media folder and see if that helps.

SteveD

unread,
May 5, 2013, 3:18:26 PM5/5/13
to miro-communit...@googlegroups.com
I concluded that part of my problem was having an out-of-sync database, although I didn't realise just how out of sync it actually was.  I took your advice to install django-south, re-ran './manage/py syncdb' and then './manage/py migrate'.

I'm still busy debugging the error message, but I suspect I need to solve this before looking at the thumbnail problem previously mentioned.

Here's the output of 'syncdb':

(mc)[root@skiddplayer test_project]# python manage.py syncdb
Syncing...
Creating tables ...
Creating table social_auth_usersocialauth
Creating table social_auth_nonce
Creating table social_auth_association
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.comments
 > django.contrib.flatpages
 > django.contrib.staticfiles
 > django.contrib.markup
 > localtv.admin
 > localtv.comments
 > localtv.submit_video
 > localtv.inline_edit
 > djvideo
 > registration
 > tagging
 > haystack
 > email_share
 > notification
 > social_auth
 > compressor
 > mptt
 > south

Not synced (use migrations):
 - localtv.contrib.contests
 - localtv
 - localtv.user_profile
 - localtv.playlists
 - uploadtemplate
 - djcelery
 - daguerre
(use ./manage.py migrate to migrate these)


And here's the error I receive when running 'migrate':

(mc)[root@skiddplayer test_project]# python manage.py migrate
Running migrations for contests:
 - Migrating forwards to 0002_auto__add_field_contest_rules.
 > contests:0001_initial
FATAL ERROR - The following SQL query failed: CREATE TABLE `contests_contest` (`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY, `name` varchar(100) NOT NULL, `description` longt                   ext NOT NULL, `detail_columns` varchar(10) NOT NULL, `site_id` integer NOT NULL, `votes_per_user` integer UNSIGNED NULL, `allow_downvotes` bool NOT NULL, `submissions_open` bool                    NOT NULL, `voting_open` bool NOT NULL, `display_vote_counts` bool NOT NULL);
The error was: (1050, "Table 'contests_contest' already exists")
 ! Error found during real run of migration! Aborting.

 ! Since you have a database that does not support running
 ! schema-altering statements in transactions, we have had
 ! to leave it in an interim state between migrations.

! You *might* be able to recover with:   - no dry run output for delete_unique_column() due to dynamic DDL, sorry
   - no dry run output for delete_unique_column() due to dynamic DDL, sorry
   = DROP TABLE `contests_contest` CASCADE; []
   = DROP TABLE `contests_contestvideo` CASCADE; []
   = DROP TABLE `contests_contestvote` CASCADE; []

 ! The South developers regret this has happened, and would
 ! like to gently persuade you to consider a slightly
 ! easier-to-deal-with DBMS (one that supports DDL transactions)
 ! NOTE: The error which caused the migration to fail is further up.
Error in migration: contests:0001_initial
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/management/commands/migrate.py", line 108, in handle
    ignore_ghosts = ignore_ghosts,
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/__init__.py", line 213, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 235, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 310, in migrate_many
    result = self.migrate(migration, database)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 107, in run
    return self.run_migration(migration)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 81, in run_migration
    migration_function()
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/migration/migrators.py", line 57, in <lambda>
    return (lambda: direction(orm))
  File "/opt/virtual-env/mc/src/mirocommunity/localtv/contrib/contests/migrations/0001_initial.py", line 22, in forwards
    ('display_vote_counts', self.gf('django.db.models.fields.BooleanField')(default=False)),
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 44, in _cache_clear
    return func(self, table, *args, **opts)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 352, in create_table
    ', '.join([col for col in columns if col]),
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/South-0.7.6-py2.7.egg/south/db/generic.py", line 273, in execute
    cursor.execute(sql, params)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/db/backends/util.py", line 40, in execute
    return self.cursor.execute(sql, params)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 114, in execute
    return self.cursor.execute(query, args)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/MySQLdb/cursors.py", line 201, in execute
    self.errorhandler(self, exc, value)
  File "/opt/virtual-env/mc/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
django.db.utils.DatabaseError: (1050, "Table 'contests_contest' already exists")


Stephen Burrows

unread,
May 6, 2013, 4:41:13 PM5/6/13
to miro-communit...@googlegroups.com
What happened with the contests is probably that you ran syncdb at some point after installing django.contrib.contests, but before installing south. You'll need to use ./manage.py migrate --fake contests <migration_number> to step through the migrations and make sure you've got them all. There aren't very many, so it shouldn't take long.

--Stephen


--
You received this message because you are subscribed to the Google Groups "Miro Community Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-deve...@googlegroups.com.

SteveD

unread,
May 7, 2013, 7:22:38 AM5/7/13
to miro-communit...@googlegroups.com
Hi Stephen, my test site is still unable to display thumbnails - http://player.skiddmark.com - even after updating daguerre, but I have some error messages which might help if you don't mind taking a look.

Firstly, just to check that daguerre is installed as a module I ran 'pip freeze'.  Here's the response:

(mc)[root@skiddplayer test_project]# pip freeze
BeautifulSoup==3.2.0
Django==1.4.3
Markdown==2.1.1
MySQL-python==1.2.4
PIL==1.1.7
Pillow==1.7.8
South==0.7.6
Whoosh==2.4.1
amqp==1.0.6
anyjson==0.3.3
beautifulsoup4==4.0.4
billiard==2.7.3.19
blessings==1.5
celery==3.0.13
certifi==0.0.8
chardet==1.0.1
django-appconf==0.5
django-celery==3.0.11
django-compressor==1.1.2
-e git://github.com/oberlin/django-daguerre.git@e068e2a7ff4baff75765bcea2f06240ba39ac0ea#egg=django_daguerre-dev
django-email-share==0.0.1
django-haystack==2.0.0-beta
django-mptt==0.5.2
django-nose==1.1
django-notification==0.2
django-picklefield==0.1.9
django-registration==0.8
django-social-auth==0.7.9
django-tagging==0.3.1
django-tastypie==0.9.11
django-uploadtemplate==0.0.1
djpagetabs==0.0.1
djvideo==0.0.1
facebook-sdk==0.4.0
feedparser==5.1.3
httplib2==0.7.7
kombu==2.5.4
lxml==2.3.5
mimeparse==0.1.3
-e git://github.com/pculture/mirocommunity.git@4f28dccb73ec82c3b0e409fb65f672eb5cc90032#egg=mirocommunity-dev
mock==0.8.0
nose==1.2.1
nose-exclude==0.1.9
nose-progressive==1.3
oauth==1.0.1
oauth2==1.5.211
python-dateutil==1.5
python-openid==2.2.4
pytz==2012j
requests==0.14.2
simplejson==2.3.2
vidscraper==1.0.2
wsgiref==0.1.2


Is that what you'd expect to see for django-daguerre?

Then I switched off 'DEBUG = True" in my settings.py and received the following error message via email (for each of the thumbnails on the page not being displayed):

[Django] ERROR (EXTERNAL IP): Internal Server Error: /thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg

Traceback (most recent call last):

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response

    response = callback(request, *callback_args, **callback_kwargs)

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/views/generic/base.py", line 48, in view

    return self.dispatch(request, *args, **kwargs)

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in dispatch

    return handler(request, *args, **kwargs)

  File "/opt/virtual-env/mc/src/django-daguerre/daguerre/views.py", line 29, in get

    adjusted = helper.adjust()

  File "/opt/virtual-env/mc/src/django-daguerre/daguerre/utils/adjustments.py", line 488, in adjust

    final_path = save_image(im, storage_path, format=format, storage=default_storage)

  File "/opt/virtual-env/mc/src/django-daguerre/daguerre/utils/__init__.py", line 32, in save_image

    image.save(temp, format=format)

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/PIL/Image.py", line 1467, in save

    save_handler(self, fp, filename)

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/PIL/JpegImagePlugin.py", line 557, in _save

    ImageFile._save(im, fp, [("jpeg", (0,0)+im.size, 0, rawmode)])

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/PIL/ImageFile.py", line 466, in _save

    e = Image._getencoder(im.mode, e, a, im.encoderconfig)

  File "/opt/virtual-env/mc/lib/python2.7/site-packages/PIL/Image.py", line 395, in _getencoder

    return encoder(mode, *args + extra)

TypeError: function takes at most 11 arguments (13 given)

<WSGIRequest

path:/thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg,

GET:<QueryDict: {u'a': [u'fill'], u'h': [u'216'], u's': [u'7b7e39e5d8a58a876157'], u'w': [u'300']}>,

POST:<QueryDict: {}>,

COOKIES:{'__qca': 'P0-375217138-1345395413573',

 '__utma': '121474889.628815309.1367168258.1367878389.1367917662.7',

 '__utmb': '121474889.3.9.1367919519214',

 '__utmc': '121474889',

 '__utmz': '121474889.1367168258.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)',

 'csrftoken': 'kspROHYYAbrf8BNJytkHrucR43A8dGO5',

 'fbm_180777951944665': 'base_domain=.skiddmark.com',

 'sessionid': 'd6c0d74b26e409503a1d14edd88f39cc'},

META:{'CSRF_COOKIE': 'kspROHYYAbrf8BNJytkHrucR43A8dGO5',

 'DOCUMENT_ROOT': '/opt/virtual-env/mc/src/mirocommunity/localtv/templates',

 'GATEWAY_INTERFACE': 'CGI/1.1',

 'HTTP_ACCEPT': 'image/png,image/*;q=0.8,*/*;q=0.5',

 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',

 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',

 'HTTP_CONNECTION': 'keep-alive',

 'HTTP_COOKIE': '__qca=P0-375217138-1345395413573; fbm_180777951944665=base_domain=.skiddmark.com; __utma=180072230.139882935.1351241210.1356524321.1361990452.33; __utmz=180072230.1351241210.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); csrftoken=kspROHYYAbrf8BNJytkHrucR43A8dGO5; sessionid=d6c0d74b26e409503a1d14edd88f39cc; __utma=121474889.628815309.1367168258.1367878389.1367917662.7; __utmz=121474889.1367168258.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmc=180072230; __utmc=121474889; __utmb=121474889.3.9.1367919519214',

 'HTTP_HOST': 'player.skiddmark.com',

 'HTTP_REFERER': 'http://player.skiddmark.com/video/56763/7379-hot-lap-with-the-new-pors',

 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:20.0) Gecko/20100101 Firefox/20.0',

 'PATH_INFO': u'/thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg',

 'PATH_TRANSLATED': '/opt/virtual-env/mc/src/mirocommunity/test_project/test_project/wsgi.py/thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg',

 'QUERY_STRING': 'a=fill&h=216&s=7b7e39e5d8a58a876157&w=300',

 'REMOTE_ADDR': '86.138.206.220',

 'REMOTE_PORT': '64812',

 'REQUEST_METHOD': 'GET',

 'REQUEST_URI': '/thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg?a=fill&h=216&s=7b7e39e5d8a58a876157&w=300',

 'SCRIPT_FILENAME': '/opt/virtual-env/mc/src/mirocommunity/test_project/test_project/wsgi.py',

 'SCRIPT_NAME': u'',

 'SERVER_ADDR': '184.106.218.149',

 'SERVER_ADMIN': 'sup...@fitchmedia.com',

 'SERVER_NAME': 'player.skiddmark.com',

 'SERVER_PORT': '80',

 'SERVER_PROTOCOL': 'HTTP/1.1',

 'SERVER_SIGNATURE': '<address>Apache/2.2.15 (CentOS) Server at player.skiddmark.com Port 80</address>\n',

 'SERVER_SOFTWARE': 'Apache/2.2.15 (CentOS)',

 'mod_wsgi.application_group': '',

 'mod_wsgi.callable_object': 'application',

 'mod_wsgi.handler_script': '',

 'mod_wsgi.input_chunked': '0',

 'mod_wsgi.listener_host': '',

 'mod_wsgi.listener_port': '80',

 'mod_wsgi.process_group': 'player.skiddmark.com',

 'mod_wsgi.request_handler': 'wsgi-script',

 'mod_wsgi.script_reloading': '1',

 'mod_wsgi.version': (3, 3),

 'wsgi.errors': <mod_wsgi.Log object at 0x7fcedc51ff70>,

 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7fcefaa3ddc8>,

 'wsgi.input': <mod_wsgi.Input object at 0x7fcedc51ff30>,

 'wsgi.multiprocess': True,

 'wsgi.multithread': True,

 'wsgi.run_once': False,

 'wsgi.url_scheme': 'http',

 'wsgi.version': (1, 1)}>


I have read elsewhere this might be a problem with Pillow - https://github.com/sorl/sorl-thumbnail/issues/150 - any advice?

SteveD

unread,
May 7, 2013, 12:39:13 PM5/7/13
to miro-communit...@googlegroups.com
Stephen, looking at my installed packages a little closer (using yolk -l), I notice there are four versions of django-daguerre listed:

...
django-appconf  - 0.5          - active
django-celery   - 3.0.11       - active
django-compressor - 1.1.2        - active
django-daguerre - 0.1          - non-active
django-daguerre - 0.1          - non-active
django-daguerre - 0.1          - active development (/opt/virtual-env/mc/src/django-daguerre)
django-daguerre - 0.1          - active development (/opt/virtual-env/mc/src/django-daguerre)

django-email-share - 0.0.1        - active
...


I also notice the version number is listed as '0.1' whereas the git repo refers to '1.0' as the latest version.  Could you advise on how I should go about cleaning this up and ensuring only the correct version is referenced.

Thanks
Steve

SteveD

unread,
May 7, 2013, 12:51:16 PM5/7/13
to miro-communit...@googlegroups.com
Sorry, I've partially answered by own question by running pip install again, but this time with the very latest commit -e git+git://github.com/oberlin/django-daguerre.git@a3850413b420eb87e09eeb10846d1a23c54109ba#egg=django-daguerre

Now 'yolk -l' produces:

django-daguerre - 0.1          - non-active
django-daguerre - 1.0.0        - active development (/opt/virtual-env/mc/src/mirocommunity/test_project/src/django-daguerre)

But still the same error message and thumbnails fail to load.  Submitting a new video generates the same trace path as 'update_thumbnails', so the problem doesn't just exist for archived content.

My next thought is to delete the thumbnails and try to re-generate them again, but thereafter I'm really not sure what to try.  All suggestions gratefully received.  Thanks.
Message has been deleted

SteveD

unread,
May 7, 2013, 3:14:15 PM5/7/13
to miro-communit...@googlegroups.com
I believe I've sorted the TypeError, it was occurring because of a conflict between PIL and pillow.  At sometime in the past few days PIL was installed, so this has now been uninstalled. 

Problem now is an IntegrityError for each thumbnail image loaded on a page refresh:


[Django] ERROR (EXTERNAL IP): Internal Server Error: /thumbs/adjust/localtv/video/thumbnail/2013/05/06/fde81b4984903fc82101jpeg

IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`scomc`.`daguerre_adjustedimage`, CONSTRAINT `image_id_refs_id_8e4f6ca3` FOREIGN KEY (`image_id`) REFERENCES `daguerre_image` (`id`))')

As before, I'm unsure why, but will keep digging.  Grateful for any suggestions..

Steve

Stephen Burrows

unread,
May 9, 2013, 12:19:14 AM5/9/13
to miro-communit...@googlegroups.com
Yeah, that is what was causing the TypeError. I assume you've already uninstalled both and then reinstalled Pillow.

It sounds like your daguerre tables are out of date in the database. Luckily, daguerre is designed so that you can just blow it away and start over. Do the following:

1. run manage.py dbshell and enter the following commands:
  • DROP TABLE daguerre_image;
  • DROP TABLE daguerre_area;
  • DROP TABLE daguerre_adjustedimage;
2. run manage.py migrate daguerre --fake
3. run manage.py syncdb --all
4. run manage.py clean_daguerre

Then you should be good to go!

--Stephen


--

SteveD

unread,
May 9, 2013, 4:12:56 AM5/9/13
to miro-communit...@googlegroups.com
Sorted!  Thanks for your help Stephen. :)
To unsubscribe from this group and stop receiving emails from it, send an email to miro-community-development+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages