Skip to content

fixed typos: no parantheses around exceptions, no b infront of binary data - #15

Closed
NandorKovacs wants to merge 1 commit into
anoved:masterfrom
NandorKovacs:master
Closed

fixed typos: no parantheses around exceptions, no b infront of binary data#15
NandorKovacs wants to merge 1 commit into
anoved:masterfrom
NandorKovacs:master

Conversation

@NandorKovacs

Copy link
Copy Markdown

first error:


$ ./phstl.py 
  File "/home/nandor/tmp/phstl/./phstl.py", line 125
    except RuntimeError, e:
           ^^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesize

after inserting parantheses:

$ ./phstl.py demo/example.tif out.stl
Traceback (most recent call last):
  File "/home/nandor/tmp/phstl/./phstl.py", line 308, in <module>
    with stlwriter(args.STL, facetcount) as mesh:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nandor/tmp/phstl/./phstl.py", line 68, in __init__
    self.f.write('\0' * 80)
TypeError: a bytes-like object is required, not 'str'

after inserting b'\0' instead of '\0'


$ ./phstl.py demo/example.tif out.stl
Traceback (most recent call last):
  File "/home/nandor/tmp/phstl/./phstl.py", line 354, in <module>
    mesh.add_facet((a, b, c))
  File "/home/nandor/tmp/phstl/./phstl.py", line 81, in add_facet
    self.f.write('\0\0')
TypeError: a bytes-like object is required, not 'str'

after inserting b'\0' instead of '\0\0', it runs

maybe my system is weird, or some python update broke something, i dont know. just letting you know, that this pr fixes it for me, and it works again

@NandorKovacs

Copy link
Copy Markdown
Author

i forgot to look at previous pr's
#14 fixes these already

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.

1 participant