inpho / inphosite

The InPhO API
https://inphoproject.org
15 stars 5 forks source link

journal internal server error #68

Closed colinallen closed 12 years ago

colinallen commented 12 years ago

All journal URLs appear to be returning Internal Server Error

colinallen commented 12 years ago

correction -- this internal server error may only appear when logged in .. maybe it has something to do with admin panel?

alefrost commented 12 years ago

I'm not sure, but I think this is still related to the other problem that Jaimie and I worked on last week. I wrote a short script to print off the journals that have been accessed in the past 4 weeks and this error is thrown when it just tries to print a journal:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xed' in position 18: ordinal not in range(128)

However, I'm not sure where it is trying to encode in this one, because it isn't giving me that information.

JaimieMurdock commented 12 years ago

On http://inphodev.cogs.indiana.edu:8088/journal/4845

The issue is due to pluralization in c.entity.pluralize() having an ASCII encoding error.

A way to reproduce the bug would be:

from inpho.model import *
journal = Session.query(Journal).get(4845)

for pattern in journal.pluralize():
    print pattern

Suspect you will need to do a .encode('utf-8') again.

alefrost commented 12 years ago

changed call in helper.py:59 from str() to unicode(). This closed the issue. There are still 15 urls in the list, but they can be edited now.