-
Notifications
You must be signed in to change notification settings - Fork 17
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
couldn't convert binary stl file to ascii stl file #1
Comments
Hi! Traceback (most recent call last): |
Hi! |
Ok, no problem, modifying this line: infile = open('binary.stl') #import file to this: infile = open('binary.stl', encoding="utf8") #import file has solved the problem for me. :) |
If @FireWingHu's method did not work for you, you can also try explicitly opening the file as read-only and binary, as follows:
|
im getting an xrange not defined error, someone please help |
I did this and it stopped the other errors |
Hey,
I tried to convert a binary stl file to ascii stl file, but I received an error message stating, that in some line it wasn't possible to resolve the binary part to an ascii symbol.
If you want to look into that problem, I can send you the stl file I am talking about.
The terminal output:
File "C:\Users\myname\Documents\Eclipse Workspace\STL_Converter\binary-stl-toASCII\BinaryToASCII.py", line 7, in
data = infile.read()
File "C:\Program Files\Python39\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 0x8f in position 335: character maps to
C:\Users\myname\Documents\Eclipse Workspace\STL_Converter\binary-stl-toASCII>
Best regards
Dezzard
The text was updated successfully, but these errors were encountered: