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

Is there any workable dockerfile for KIM? #70

Closed
ooker777 opened this issue Aug 29, 2023 · 9 comments
Closed

Is there any workable dockerfile for KIM? #70

ooker777 opened this issue Aug 29, 2023 · 9 comments
Labels
accepted Being worked on in next version enhancement New feature or request fixed Bug has been fixed in upcoming version

Comments

@ooker777
Copy link

As the login problem keeps haunting everyone, I guess the simplest solution is to use Docker. Do you have any workable dockerfile for it?

@djsudduth
Copy link
Owner

Unfortunately, not yet. If you scroll to the bottom of the README you'll see it on the list of things to do. 😄

@ooker777
Copy link
Author

ooker777 commented Aug 30, 2023

Yeah I did notice it but still wonder why it wasn't applicable now. I thought it demands low effort yet has big impact? Or do you not have time to ensure your dockerfile works for everyone?


I went ahead and use this dockerfile:

FROM ubuntu:20.04
RUN apt update && apt install -y python-is-python3 python3-pip
COPY . .
RUN cd keep-it-markdown && pip install -r requirements.txt

Then it aborts for not being able to wait for user input. I inject my userid and pw right in the script, then for kim.py I have:

Username or password is incorrect (NoKeyringError('No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.'))

And for keep-test.py I have:
AttributeError("module 'urllib3.util.ssl_' has no attribute 'DEFAULT_CIPHERS'") Please start your browser and copy-paste this URL in the address bar: https://accounts.google.com/DisplayUnlockCaptcha - then, try logging in again.

This improved dockerfile solves these issues:

FROM ubuntu:20.04
RUN apt update && apt install -y python-is-python3 python3-pip 
COPY . .
RUN pip install requests==2.23.0 keyrings.alt 
RUN cd keep-it-markdown && pip install -r requirements.txt
CMD python keep-it-markdown/kim.py

@djsudduth
Copy link
Owner

Thanks for looking into this. A couple reasons I've paused on pursuing this - one was the Google official API was released for workspace users and my hope was it would be implemented in the single user space as well (which would solve these problems). So far, nothing yet. Also, I don't have a lot of time to do all the necessary testing (vs dev) so have been just avoiding the extra time more recently.

If you solve this I'm happy to integrate it into the next release!

@djsudduth djsudduth added enhancement New feature or request question Further information is requested labels Aug 31, 2023
@ooker777
Copy link
Author

ooker777 commented Sep 1, 2023

I see. Yeah I think I solve this, but I'm not sure since I'm also new to Docker. If you don't have time for this I can make a PR as well

@djsudduth
Copy link
Owner

Hey @ooker777 - I could use your help. I was able to create a Dockerfile in issue #72 (Dockerfile steps are there) to get the Keep token successfully. But, I can't seem to get the Keyring/Keystore to run in the Ubuntu Docker image - the pip install keyring.alt didn't work in my image (meaning it installed, but would fail with a keyring error when KIM was launched). I've tried installing multiple Keyrings but they've all failed. I think I need a .bashrc setup to launch the service - but not sure yet. At least in issue #72 you can get the token and save it for other OSs. Any ideas?

@ooker777
Copy link
Author

ooker777 commented Nov 4, 2023

Hey, thanks for the getting back. Unfortunately I've done my project for more than a month and my mind now doesn't even recognize the code I wrote :(. To really investigate the problem I need to switch back to the programming mode, and switching costs are high between software development and research thinking. I don't remember what happened next after I got the dockerfile, but I can tell that something had happened that I decided to use the gkeepapi directly to save me from headaches.

@djsudduth
Copy link
Owner

No problem. Are you referring to the paid Google Workspace gnoteapi?

@ooker777
Copy link
Author

ooker777 commented Nov 4, 2023

no, the the unofficial one

@djsudduth
Copy link
Owner

Ah ok - same one. Thx.

@djsudduth djsudduth added accepted Being worked on in next version and removed question Further information is requested labels Nov 5, 2023
@djsudduth djsudduth added the fixed Bug has been fixed in upcoming version label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted Being worked on in next version enhancement New feature or request fixed Bug has been fixed in upcoming version
Projects
None yet
Development

No branches or pull requests

2 participants