Skip to content
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.

_get_file_path() cannot handle DMA codes as integers #1

Closed
gserapio opened this issue Apr 2, 2020 · 2 comments
Closed

_get_file_path() cannot handle DMA codes as integers #1

gserapio opened this issue Apr 2, 2020 · 2 comments

Comments

@gserapio
Copy link
Contributor

gserapio commented Apr 2, 2020

First of all, this is a great package. A big thanks to the talented people at Pew Research for putting this out there.

It seems like the function _get_file_path() in search_sampler/_init_.py is rejecting DMA codes since the codes are stored as integers. At line 144:

str_path = os.path.join(self.output_path, self.params["region"])

Issue can be reproduced by running example.py with the 'region' parameter set to 500 (without quotes):

TypeError: join() argument must be str or bytes, not 'int'

Note that the issue can't be fixed by setting the 'region' parameter to '500' (as a string) because pull_data_from_api() requires params['region'] to be an integer.

@GalenStocking
Copy link

Thanks for bringing this to our attention! We've implemented a fix that should address this - please let us know if it does not.

@gserapio
Copy link
Contributor Author

gserapio commented Apr 7, 2020

Thank you, this fix worked great!

@gserapio gserapio closed this as completed Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants