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

Strange path behaviour when using IPython terminal in Spyder #68

Open
btodac opened this issue Sep 13, 2023 · 0 comments
Open

Strange path behaviour when using IPython terminal in Spyder #68

btodac opened this issue Sep 13, 2023 · 0 comments

Comments

@btodac
Copy link

btodac commented Sep 13, 2023

When I tried to follow the example in an IPython terminal (based from a non HOME location) using Spyder there was some strange behaviour.
pystore.set_path("~/pystore")
Creates a folder in the current working directory called ~/pystore i.e. /path/to/my/files/~/pystore rather than /home/user/pystore
When I execute the line:
collection.write('^GDAXI', data, metadata={'source': 'Yahoo'})
I get the error
FileNotFoundError: [Errno 2] No such file or directory: '~/pystore/mydatastore/tickers/^GDAXI/metadata.json'
This path is the correct unix filepath pointing to /home/user/pystore/mydatastore/tickers/^GDAXI/metadata.json. The command does create the directory /home/user/pystore/mydatastore/tickers/^GDAXI/ and the parquet file, but the metadata file is located in the incorrect directory mentioned above.
I am not sure if this is something you want to look at, but there seems to be some variation in the way the paths are generated.
My simple repair (not backward compatible) is to alter the get_path path function to return Path(config.DEFAULT_PATH, *args).expanduser(), but this is incompatible with pathlib2

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

1 participant