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

Error Reading LTDB Data: File Path Not Working #416

Closed
shengxiangjinuci opened this issue Jan 27, 2025 · 6 comments · Fixed by #417
Closed

Error Reading LTDB Data: File Path Not Working #416

shengxiangjinuci opened this issue Jan 27, 2025 · 6 comments · Fixed by #417
Assignees

Comments

@shengxiangjinuci
Copy link

Image Hi,

Thanks for this wonderful tool.

I’m encountering an issue when trying to read the LTDB data using the gio.store_ltdb() function. Specifically, when I provide the file path to the zip file, the function does not work as expected.

Best,

@knaaptime
Copy link
Member

thanks for raising @shengxiangjinuci

I havent used the LTDB data in awhile. The issue here is our ltdb reader is hardcoded to an older version of the data and it expects all CSV files are in the root of the zip archive. The newest release has a slightly different structure (the files are inside a second subdirectory and have a few tweaks to filenames)

Image

this should be a simple fix in the code. I don't think its feasible to have compatibility with multiple versions of LTDB because we'll probably always be hardcoding the file paths, but maybe we could check the hashes of the zip files as a simple 'version' check on the ltdb

@knaaptime
Copy link
Member

alternatively we could have users pass individual paths to each csv file, but I think I prefer the zip approach

@knaaptime knaaptime self-assigned this Jan 27, 2025
@shengxiangjinuci
Copy link
Author

The zip method is undoubtedly ideal, but perhaps allowing a list of each csv file to be passed would also be a good backup plan.

@shengxiangjinuci
Copy link
Author

Hi,

I was wondering if it would be possible to share old versions of the LTDB file zip so that we can use this data directly in functions. Since I want to combine it with ACS data to create a long dataframe, I would like to do all the operations in geosnap for consistency.

Best,

@knaaptime
Copy link
Member

@shengxiangjinuci i dont think i have an old version of LTDB (though I'll check) but the latest commit in #417 updates the paths to the newest data in the zip files (just released on their end) and also lets you pass a set of file paths in case you want to unpack the zips yourself. The latter approach should work with any version of the LTDB data unless they change the formatting of the CSV files sometime in the future

@shengxiangjinuci
Copy link
Author

Thanks, I've tried the updated version and it works great.

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

Successfully merging a pull request may close this issue.

2 participants