Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on open_raw() #1415

Open
dhonanhibatullah opened this issue Nov 26, 2024 · 2 comments
Open

Issue on open_raw() #1415

dhonanhibatullah opened this issue Nov 26, 2024 · 2 comments

Comments

@dhonanhibatullah
Copy link

I am trying to run a simple code as follows.

from echopype import open_raw

ed = open_raw(
     'SD.raw',
    sonar_model = 'EK60'
)

But I got the following error:

Traceback (most recent call last):
  File "/usr/lib/python3.12/pathlib.py", line 555, in drive
    return self._drv
           ^^^^^^^^^
AttributeError: 'NodePath' object has no attribute '_drv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/dhonan/Workspaces/temp/test.py", line 3, in <module>
    ed = open_raw(
         ^^^^^^^^^
  File "/home/dhonan/Workspaces/temp/.venv/lib/python3.12/site-packages/echopype/utils/prov.py", line 237, in inner
    dataobj = func(*args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhonan/Workspaces/temp/.venv/lib/python3.12/site-packages/echopype/convert/api.py", line 540, in open_raw
    tree = DataTree.from_dict(tree_dict, name="root")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/dhonan/Workspaces/temp/.venv/lib/python3.12/site-packages/datatree/datatree.py", line 360, in from_dict
    node_name = NodePath(path).name
                ^^^^^^^^^^^^^^
  File "/home/dhonan/Workspaces/temp/.venv/lib/python3.12/site-packages/datatree/treenode.py", line 34, in __new__
    if obj.drive:
       ^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 557, in drive
    self._load_parts()
  File "/usr/lib/python3.12/pathlib.py", line 408, in _load_parts
    paths = self._raw_paths
            ^^^^^^^^^^^^^^^
AttributeError: 'NodePath' object has no attribute '_raw_paths'

Please note that I am using Python virtual environment, with echopype==0.9.0. Any idea on fixing this?

@leewujung
Copy link
Member

@dhonanhibatullah : I think this is likely due to the datatree version, since we pinned it to an earlier version to avoid conflict. What are the versions of xarray and datatree in your env?

@dhonanhibatullah
Copy link
Author

xarray==2024.11.0
xarray-datatree==0.0.6

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

No branches or pull requests

2 participants