- download the file
- start FreeCAD
-adapt the code to your location
- run the code
Code: Select all
f = open("C:/Users/BHA/Desktop/Graphite.txt", encoding="utf8")
for line in f:
print(line)
Code: Select all
>>>
>>> f = open("C:/Users/BHA/Desktop/Graphite.txt", encoding="utf8")
>>> for line in f:
... print(line)
...
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\0_BHA_privat\progr\FreeCAD_0.19.xxxxx_Py3Qt5\bin\lib\codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 20: invalid start byte
>>>