Ask Your Question
1

'charmap' codec can't decode byte 0x8f in position 2: character maps to <undefined>

asked 2021-07-24 09:55:45 -0500

PythonGuy gravatar image

Hello All, I have been getting the below error when I tried to run the query that returns the branch name and not sure how to resolve the issue. Your help is much appreciated. Thanks in Advance!!

*

*>     ierr1, rval = psspy.brnnam(barray[0][j],jbus,ickt)  
> File ".\psspy.py", line 90052, in
> brnnam   File
> "C:\Python37\lib\encodings\cp1252.py",
> line 15, in decode
>         return codecs.charmap_decode(input,errors,decoding_table)
> UnicodeDecodeError: 'charmap' codec
> can't decode byte 0x8f in position 2:
> character maps to <undefined>*

*

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2024-01-10 13:10:37 -0500

KyleA gravatar image

After reaching out to Siemens about this, their answer was to upgrade to a newer version. In my case, I was using v34, and they recommended version 34.9.4 or later. After upgrading to v 34.9.6 the issue seems to have gone away.

edit flag offensive delete link more
-1

answered 2021-08-02 17:48:17 -0500

jconto gravatar image

updated 2021-08-13 16:54:11 -0500

It happen to me too. It works fine after adding the next command to the top of the python script:

# -*- coding: cp1252 -*-
edit flag offensive delete link more

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

1 follower

Stats

Asked: 2021-07-24 09:55:45 -0500

Seen: 2,201 times

Last updated: Jan 10