Ask Your Question
0

PSS/E Rev 33 - psspy.py UnicodeWarning

asked 2013-09-17 18:34:24 -0500

EBahr gravatar image

I have been testing out some of my code in PSS/E 33 and am getting the following error:

C:\Progra~2\PTI\PSSE33\PSSBIN\psspy.py:16893: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal

It is cluttering up my output and I am not sure what is causing it. There is A LOT of code in my program, so I haven't been able to pinpoint what commands are causing it to produce this error. Also, I do not get this error when I run the same program in PSS/E 32. Any thoughts?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-09-18 07:29:38 -0500

jsexauer gravatar image

updated 2013-09-18 07:33:16 -0500

You can run your program and cause warning to be raised as exceptions by doing the following:

python -W error program.py

alternately, put this at the top of your code:

import warnings    
warnings.simplefilter("error")

That way a nice stack trace is generated and you can see which call(s) are causing the problem.

Refer to the warnings documentation for more details, including how your could just suppress printing the warnings if you find that's the best way to resolve your problem.

edit flag offensive delete link more

Comments

Looks like it is throwing the warning every time I am using a string retrieved from a `wx.TextCtrl` box. I wonder if it doesn't like my version of `wx` (I believe it is the unicode version). `warnings.simplefilter("ignore")` did the trick though.

EBahr gravatar imageEBahr ( 2013-09-18 08:25:16 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

Stats

Asked: 2013-09-17 18:34:24 -0500

Seen: 838 times

Last updated: Sep 18 '13