Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in … #57

Merged
merged 1 commit into from
Nov 21, 2019

Conversation

thneumann
Copy link

…position 54258: character maps to

When I try to execute the example, I get the following error message:
Traceback (most recent call last):
File "tm.py", line 5, in
tm = TM("my test tm")
File "C:\Users\thorbne\PycharmProjects\pytm\pytm\pytm.py", line 195, in init
threats_json = json.load(threat_file)
File "C:\Users\thorbne\AppData\Local\Programs\Python\Python38\lib\json_init_.py", line 293, in load
return loads(fp.read(),
File "C:\Users\thorbne\AppData\Local\Programs\Python\Python38\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 54258: character maps to

It's because python is using a wrong enconding. I added utf-8 as encoding to be used and now the example is working fine.

…position 54258: character maps to <undefined>
@thneumann thneumann requested a review from izar as a code owner November 21, 2019 15:54
@ghost
Copy link

ghost commented Nov 21, 2019

DeepCode Report (#770493)

DeepCode analyzed this pull request.
There are no new issues.

Copy link
Collaborator

@izar izar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! From your filename I take it you're running on Windows - how is that going? Do dot and plantuml work well?

@izar izar merged commit 602d67c into OWASP:master Nov 21, 2019
@thneumann
Copy link
Author

Well, I used the version after the commits on Sep 26 before. I didn't face any problems. Neither with plantuml nor with graphviz or Java. After my pull yesterday it seems that I have some problems with plantuml as I am not able to create the sequence diagram. DFD and report are still working fine on Windows environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants