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

get_hdf5 raises exception #34

Open
max-radin opened this issue Dec 6, 2024 · 1 comment
Open

get_hdf5 raises exception #34

max-radin opened this issue Dec 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@max-radin
Copy link

When I try to call get_hdf5 I get the exception below. This is using pyliqtr 1.3.3 installed through pypi.

Traceback (most recent call last):
  File "/Users/maxradin/Development/scratch/get_hdf5_bug.py", line 2, in <module>
    mol = get_hdf5(140)
          ^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pyLIQTR/utils/get_hdf5.py", line 17, in get_hdf5
    chem_data = pd.read_csv(filename)
                ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/util/_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 605, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1442, in __init__
    self._engine = self._make_engine(f, self.engine)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/io/parsers/readers.py", line 1735, in _make_engine
    self.handles = get_handle(
                   ^^^^^^^^^^^
  File "/Users/maxradin/anaconda3/lib/python3.11/site-packages/pandas/io/common.py", line 856, in get_handle
    handle = open(
             ^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'chemistry_instances.csv'
@max-radin max-radin added the bug Something isn't working label Dec 6, 2024
@kjm538
Copy link
Collaborator

kjm538 commented Dec 16, 2024

This looks like it may be related to #24. Depending on where you're calling from you can specify the full path using get_hdf5(140, filename="path/to/chemistry_instances.csv". The file in question is currently here: Examples/ApplicationInstances/LocalChemistry/chemistry_instances.csv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants