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

[Bug]: HERD does not generate the paths properly when reading a zip #1045

Closed
mavaylon1 opened this issue Jan 29, 2024 · 0 comments · Fixed by #1046
Closed

[Bug]: HERD does not generate the paths properly when reading a zip #1045

mavaylon1 opened this issue Jan 29, 2024 · 0 comments · Fixed by #1046
Assignees
Labels
category: bug errors in the code or code behavior priority: high impacts proper operation or use of feature important to most users

Comments

@mavaylon1
Copy link
Contributor

mavaylon1 commented Jan 29, 2024

What happened?

When reading a HERD zip file, it expands the the zip to read the table tsv files. However the path used is not correct, and it cannot find the tables.

The fix should be a change from

zip_file = kwargs['path']
directory = os.path.dirname(zip_file)

to

zip_file = kwargs['path']
directory = os.path.dirname(os.path.realpath(zip_file))

How did this happen/not get flagged?
In the tests, I provided the path as './HERD.zip', which allowed the path to be '.'. However, in my tutorial the path I used for the zip was 'HERD.zip', which made the path to be ' '. This did not extract the tsv files.

With the fix, both inputs will be valid as it provides the full path no matter what.

Steps to Reproduce

Run the doc but in an outside directory.

Traceback

No response

Operating System

macOS

Python Executable

Conda

Python Version

3.12

Package Versions

No response

@mavaylon1 mavaylon1 self-assigned this Jan 29, 2024
@mavaylon1 mavaylon1 added category: bug errors in the code or code behavior priority: high impacts proper operation or use of feature important to most users labels Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior priority: high impacts proper operation or use of feature important to most users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant