Open gdinh opened 3 months ago
Weird. I'm just running into a different issue, but I can reproduce yours if I use an ephemeral shell.
> nix-shell -p gyb
[nix-shell:~]$ gyb --version
Traceback (most recent call last):
File "/nix/store/akild48w36i3k7pc6z8nj0qbp51vmzy4-gyb-1.81/bin/.gyb-wrapped", line 87, in <module>
import google.oauth2.service_account
ModuleNotFoundError: No module named 'google.oauth2'
However I first added it to systemPackages
and it just worked.
> gyb --version
Got Your Back 1.81
jaylee.us/gyb
Jay Lee - jay0lee@gmail.com
Python 3.12.4 64-bit final
google-api-client 2.135.0
Linux-6.6.35-x86_64-with-glibc2.39 x86_64
Path: /nix/store/akild48w36i3k7pc6z8nj0qbp51vmzy4-gyb-1.81/bin
ConfigPath: /nix/store/akild48w36i3k7pc6z8nj0qbp51vmzy4-gyb-1.81/bin
OpenSSL 3.0.14 4 Jun 2024
gmail.googleapis.com connects using TLSv1.3 TLS_AES_256_GCM_SHA384
So maybe something else in my systemPackages
is providing google.oauth2
?
In any case, this didn't completely work. After setting things up, gyb
tried to write to a json in the binary directory:
...
The authentication flow has completed.
Creating project "Got Your Back Project"...
Checking project status...
enabling API drive.googleapis.com...
enabling API gmail.googleapis.com...
enabling API groupsmigration.googleapis.com...
enabling API iap.googleapis.com...
enabling API vault.googleapis.com...
Creating Service Account
ERROR: [Errno 30] Read-only file system: '/nix/store/akild48w36i3k7pc6z8nj0qbp51vmzy4-gyb-1.81/bin/oauth2service.json'
So after a lot of fiddling around with the Google API config, I managed to get a backup started.
The solution for the 'Read-only file system' error is to always explicitly specify the config directory with --config-folder
and an appropriate path.
I'm not sure what makes gyb work when installed as a system package, but perhaps that will work for others.
Sounds like this is working as intended? 🤷
Describe the bug
Package
gyb
crashes on execute, complaining of missing python module.Steps To Reproduce
Steps to reproduce the behavior:
Oddly enough, trying the import in the python repl works.
Notify maintainers
@austinbutler
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Reproduced bug on two machines:
Machine 1:
Machine 2:
Add a :+1: reaction to issues you find important.