Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ModuleNotFoundError: No module named 'six.moves' #103

Open
eyalzek opened this issue Nov 15, 2024 · 2 comments
Open

ModuleNotFoundError: No module named 'six.moves' #103

eyalzek opened this issue Nov 15, 2024 · 2 comments

Comments

@eyalzek
Copy link
Contributor

eyalzek commented Nov 15, 2024

Docker image tag 0.77 is failing with the error in the title:

$ gcpdiag lint --project  <PROJECT_ID>
Trying to pull us-docker.pkg.dev/gcpdiag-dist/release/gcpdiag:0.77...
Getting image source signatures
Copying blob 8fc0ca9db0b0 done   | 
Copying blob a26fa095e3c8 done   | 
Copying blob 99eef00f51a7 done   | 
Copying blob 6a6e32e60546 done   | 
Copying blob ff65ddf9395b done   | 
Copying blob 0839cacc4efd done   | 
Copying blob 839fca60997c done   | 
Copying blob 68cd88696cf1 done   | 
Copying blob c52d7fdcc910 done   | 
Copying blob 5b26d6cd77ec done   | 
Copying blob d9900443c7b7 done   | 
Copying blob 9f5e323d68f0 done   | 
Copying config 24a85ada98 done   | 
Writing manifest to image destination
Traceback (most recent call last):
  File "/opt/gcpdiag/bin/gcpdiag", line 23, in <module>
    from gcpdiag.lint import command as lint_command
  File "/opt/gcpdiag/gcpdiag/lint/__init__.py", line 42, in <module>
    from gcpdiag.queries import logs
  File "/opt/gcpdiag/gcpdiag/queries/logs.py", line 47, in <module>
    import dateutil.parser
  File "/opt/gcpdiag/.venv/lib/python3.12/site-packages/dateutil/parser/__init__.py", line 2, in <module>
    from ._parser import parse, parser, parserinfo, ParserError
  File "/opt/gcpdiag/.venv/lib/python3.12/site-packages/dateutil/parser/_parser.py", line 50, in <module>
    from .. import tz
  File "/opt/gcpdiag/.venv/lib/python3.12/site-packages/dateutil/__init__.py", line 16, in __getattr__
    return importlib.import_module("." + name, __name__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/gcpdiag/.venv/lib/python3.12/site-packages/dateutil/tz/__init__.py", line 2, in <module>
    from .tz import *
  File "/opt/gcpdiag/.venv/lib/python3.12/site-packages/dateutil/tz/tz.py", line 21, in <module>
    from six.moves import _thread
ModuleNotFoundError: No module named 'six.moves'
@ebenezergraham
Copy link
Collaborator

Thanks for reporting the issue. Please try again reverted to 0.76

@eyalzek
Copy link
Contributor Author

eyalzek commented Nov 15, 2024

0.76 work as expected.

Just for anyone else affected, I'm adding DOCKER_IMAGE_VERSION=0.76 in line 137 of the gcpdiag script, e.g.:

DOCKER_IMAGE_VERSION=0.76
# shellcheck disable=SC2086
exec "$RUNTIME" run "$USE_TTY" \
  --rm \
  -u "$(id -u):$(id -g)" \
  -e "USER=$(id -n -u)" \
  -e "GROUP=$(id -n -g)" \
  -e "SHELL=/bin/bash" \
  -e HOME -e LANG -e GOOGLE_AUTH_TOKEN -e CLOUD_SHELL \
  -v "$HOME/.cache/gcpdiag-dockerized:$HOME/.cache/gcpdiag" \
  -v "$HOME/.config/gcloud:$HOME/.config/gcloud" \
  $CONFIG_MOUNT \
  $AUTH_KEY_MOUNT \
  "$DOCKER_IMAGE:$DOCKER_IMAGE_VERSION" /opt/gcpdiag/bin/gcpdiag $ARGS

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants