wolph / numpy-stl

Simple library to make working with STL files (and 3D objects in general) fast and easy.
http://numpy-stl.readthedocs.org/
BSD 3-Clause "New" or "Revised" License
628 stars 107 forks source link

Fix import in stl/mesh.py #217

Closed carolinafernandezp closed 1 year ago

carolinafernandezp commented 1 year ago

Fixes #215

wolph commented 1 year ago

In what case would this fix anything?

The linked issue is most likely due to conflicting packages instead

carolinafernandezp commented 1 year ago

In what case would this fix anything?

The linked issue is most likely due to conflicting packages instead

I was having the same problem as the person that raised the issue (and had no other stl module installed and no other file named stl.py in my directory) and this resolved it.

wolph commented 1 year ago

Very odd... it shouldn't make any difference.

Can you please test what happens if you add this at the top of mesh.py?

from . import stl
print(stl)
carolinafernandezp commented 1 year ago

Very odd... it shouldn't make any difference.

Can you please test what happens if you add this at the top of mesh.py?

from . import stl
print(stl)

I get the following (I agree that it shouldn't make a difference): <module 'stl.stl' from '/home/lab/.local/lib/python3.10/site-packages/stl/stl.py'>

It finds the package, same if I do print(stl.BaseStl): <class 'stl.stl.BaseStl'>

I can just close this PR since it found it without a problem now, not sure why it happened.