Open rminhxm opened 5 years ago
Hi @rminhxm - this issue looks like it might be on the omfvista
-side rather than the OMF backend (this repository). Could you share a few more details to help me understand what's going wrong in this example?
Where exactly did you download the 'test_file.omf'
file?
What is your version of omfvista
, omf
, and properties
?
import omfvista, omf, properties
print('omfvista: ', omfvista.__version__)
print('omf: ', omf.__version__)
print('properties: ', properties.__version__)
Hi @banesullivan , thanks for looking into this. Here with more info:
omfvista: 0.2.0
omf: 1.0.1
properties: 0.6.0b0
I followed the README guide and install all dependencies with pip.
Thank you for sharing those details - I have reproduced this issue locally.
This appears to be the result of a change that is present on the master branch of OMF (this repo) which I haven't corrected in omfvista
. I'll look in the commit history and see what I can do to update omfvista
to reflect most recent changes to OMF
To generalize this issue (adopted from the docs), the following example is failing when using the master branch of omf
:
>>> import numpy as np
>>> import omf
>>>
>>> pts = omf.PointSetElement(
... name='Random Points',
... description='Just random points',
... geometry=omf.PointSetGeometry(
... vertices=np.random.rand(100, 3)
... ),
... data=[
... omf.ScalarData(
... name='rand data',
... array=np.random.rand(100),
... location='vertices'
... ),
... omf.ScalarData(
... name='More rand data',
... array=np.random.rand(100),
... location='vertices'
... )
... ],
... )
Traceback (most recent call last):
File "<stdin>", line 4, in <module>
AttributeError: module 'omf' has no attribute 'PointSetGeometry'
Immediate solution... revert to the stable version deployed on PyPI: pip install omf==1.0.1
Trying to run this example to load assets/test_file.omf but failed: https://mybinder.org/v2/gh/OpenGeoVis/omfvista/master?filepath=Example.ipynb
Error messages: