-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fails to work when run in a daemon process. #144
Comments
The error comes from requests-oauthlib, which is problably caused by a missing token. Can the daemon access the token cache file? |
Where will it look for the cache file? Perhaps if it used a fixed location (home directory of the user running the daemon for example) it might find it. I have made a temporary modification to your code locally to make the location of the cache.json file be in /tmp and now the daemon works. So it seems to be that it cannot find the cache file when running as a daemon. |
I have used teslapy to create a process than can either run in the terminal or as a daemon. When I run it in the terminal it successfully talks to the tesla API and starts/stops my car charging. If I run it as a daemon then it no longer works. I think it has something to do with stdin being closed. When running it as a daemon it keeps reporting this error: "EOF when reading a line". If instead of connecting stdin to /dev/null, I connect it to a file containing just a newline then I get this error instead: "Please supply either code or authorization_response parameters.", hence why I think it is related to stdin being closed.
The text was updated successfully, but these errors were encountered: