On Wednesday 17 August 2016 18:56, Poul Riis wrote: > I tried the following: > > from pystl import PySTL > with PySTL('stl_test.stl') as stl: > stl.add_triangle((0,0,0),(1,0,0),(0,1,0)) > > I got the following error message:
Ah, bad news I am afraid. That looks like a bug in pystl. I don't think there is anything you can do about it except: - make sure you have the most recent version of pystl; - make sure that it supports the version of Python you are using; - if so, report it as a bug to the pystl project. > > Traceback (most recent call last): > File > "C:/Users/pr/AppData/Local/Programs/Python/Python35-32/Lib/idlelib/pystl_module_test_1.py", > line 3, in <module> > with PySTL('stl_test.stl') as stl: > File > "c:\users\pr\appdata\local\continuum\anaconda3\lib\site- packages\pystl\pystl.py", > line 62, in __enter__ > self.write_stl_header() > File > "c:\users\pr\appdata\local\continuum\anaconda3\lib\site- packages\pystl\pystl.py", > line 75, in write_stl_header > self.f.write(struct.pack("80s", header_str)) > struct.error: argument for 's' must be a bytes object -- Steve -- https://mail.python.org/mailman/listinfo/python-list