Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5584 closed (invalid)

unknown encoding cp0 when encountering a print command

Reported by: benedict.verheyen@… Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords: encoding cp0
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This error occurs after r5600 (unicode merge).
My view uses a class that also is used as a standalone class in other software.
The class generates a password amongst other things and the prints that to the console.

def report(self):

print "Paswoord: %s " % self.paswoord

After revision 5600, these print command result in the afor mentioned error
I tried adding an enconding stanza to the top of the source file but that didn't work.

Attachments (2)

user_creation.py (13.4 KB) - added by benedict.verheyen@… 7 years ago.
html file containing the traces of the error
user_creation.2.py (13.4 KB) - added by benedict.verheyen@… 7 years ago.
code of the class containing the print commands

Download all attachments as: .zip

Change History (8)

Changed 7 years ago by benedict.verheyen@…

html file containing the traces of the error

Changed 7 years ago by benedict.verheyen@…

code of the class containing the print commands

comment:1 in reply to: ↑ description Changed 7 years ago by benedict.verheyen@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

I tried to add the error trace but Akismet says it's spam.
If you want the trace, check the gmane django newsgroup, i've made a post
with the title "unknown encoding cp0" also that contains the trace or mail me
for the trace

comment:2 Changed 7 years ago by mir

  • Resolution set to invalid
  • Status changed from new to closed

The ticket system is not for user support. Please consult the unicode documentation and ask at the django-user mailing list for help. The unicode change contains backwards-incompatible changes, and you need to adapt your code.

comment:3 Changed 7 years ago by benedict.verheyen@…

I know this is not meant for support and I asked already on the user mailing list (no response).
That's why i thought it was a bug.
Since you seem to be knowledgable on the subject of this error, it would be handy if you could
point to the exact documentation that deals on this subject instead of just saying
"Please consult the unicode documentation".

comment:4 Changed 7 years ago by mir

Well, please attach at least the model, the full backtrace, your settings.ini. The unicode docs are at
http://www.djangoproject.com/documentation/unicode/
(or follow the second like that google gives for 'django unicode')

BTW, the list of backwards incompatible changes is at
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges.
you should read them before you update to a later svn revision.

Both are linked from the main Django documentation page (guess what google 'django documentation' brings up?)

I don't know about your email to the list, but if you've put in as 'much' detail like in this ticket, no wonder that you haven't got any response.

comment:5 Changed 7 years ago by mir

Ah, I forgot this link, which might be most useful to you (and it's actually not so easy to spot):

http://code.djangoproject.com/wiki/UnicodeBranch#PortingApplicationsTheQuickChecklist

comment:6 Changed 7 years ago by benedict.verheyen@…

Thanks, that link is useful.
As for your last comment "but if you've put in as 'much' detail like in this ticket, no wonder that you haven't got any response"
I did provide the backtrace and code in the newsgroup post and i tried to do the same here.

However, the trace was rejected by your system (Akismet what ever that is). See the change history:

"I tried to add the error trace but Akismet says it's spam. If you want the trace, check the gmane django newsgroup, i've made a post with the title "unknown encoding cp0" also that contains the trace or mail me for the trace"

So it's not like i didn't try eh.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.