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

Bot won't read or write to .json #121

Open
Nyatalie12 opened this issue May 5, 2020 · 1 comment
Open

Bot won't read or write to .json #121

Nyatalie12 opened this issue May 5, 2020 · 1 comment

Comments

@Nyatalie12
Copy link

Nyatalie12 commented May 5, 2020

I formatted a .json as a brain and the bot is neither reading nor writing to the file, even though the command line says it is.

Initially, upon startup I get

INFO:pyborg.util.util_cli:pyborg folder already exists.
INFO:pyborg.pyborg:Reading dictionary...
INFO:pyborg.pyborg:Updating dictionary information...
Bottle v0.12.18 server starting up (using WSGIRefServer())...
Listening on http://localhost:2001/

Upon shutdown I was getting this, but upon observation of the .json it was unchanged

INFO:pyborg.pyborg:Writing dictionary...
INFO:pyborg.pyborg:Saving pyborg brain to C:\Users"My_Name"\AppData\Roaming\Pyborg\brains\Jennifer.json

And now, as of writing this, I'm getting a new error on shutdown

FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\Users\"My_Name"\AppData\Roaming\Pyborg\tmp\current.pyborg.json' -> 'C:\Users\"My_Name"\AppData\Roaming\Pyborg\brains\Jennifer.json'

If I remove Jennifer.json I get the same startup and shutdown errors even though there isn't a Jennifer.json? Wild stuff.

@jrabbit
Copy link
Owner

jrabbit commented May 6, 2020

Can you include the commands you ran with the output? There's some file move code that tries to fail-safe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants