Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Fix Insert sample event data error with module six not found #469

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

susumutomita
Copy link

Issue:
Fail to insert sample data with ModuleNotFoundError for 'six' module

Details:
Encountered a 'six' module not found error within the google/cloud/pubsub_v1 module in event handler

Reproduction Steps:

  1. Deploy Four Keys.
  2. Insert sample data using the following command:
python3 data-generator/generate_data.py --vc_system=github

Stack trace

ModuleNotFoundError: No module named 'six'
at . ( /usr/local/lib/python3.10/site-packages/google/cloud/pubsub_v1/publisher/client.py:22 )
at . ( /usr/local/lib/python3.10/site-packages/google/cloud/pubsub_v1/publisher/init.py:17 )
at . ( /usr/local/lib/python3.10/site-packages/google/cloud/pubsub_v1/init.py:18 )
at . ( /app/event_handler.py:20 )
at ._call_with_frames_removed ( :241 )
at .exec_module ( :883 )
at ._load_unlocked ( :688 )
at ._find_and_load_unlocked ( :1006 )
at ._find_and_load ( :1027 )
at ._gcd_import ( :1050 )
at .import_module ( /usr/local/lib/python3.10/importlib/init.py:126 )
at .import_app ( /usr/local/lib/python3.10/site-packages/gunicorn/util.py:359 )
at .load_wsgiapp ( /usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py:48 )
at .load ( /usr/local/lib/python3.10/site-packages/gunicorn/app/wsgiapp.py:58 )
at .wsgi ( /usr/local/lib/python3.10/site-packages/gunicorn/app/base.py:67 )
at .load_wsgi ( /usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py:146 )
at .init_process ( /usr/local/lib/python3.10/site-packages/gunicorn/workers/base.py:134 )
at .init_process ( /usr/local/lib/python3.10/site-packages/gunicorn/workers/gthread.py:92 )
at .spawn_worker ( /usr/local/lib/python3.10/site-packages/gunicorn/arbiter.py:589 )

How to fix this error

I updated google-cloud-pubsub to 1.7.2 then the issue has resolved and succeeded to insert sample data

@susumutomita susumutomita changed the title Fix event insert sample data error with module six not found Fix Insert sample event data error with module six not found Oct 6, 2023
@nklkarthi
Copy link

#470

@edjshelton
Copy link

This didn't fix this issue for me.

Updated requirements.txt with the newer version (which is still ancient btw), made sure to use a commit SHA instead of latest before running cloud build to push the updated Docker image, deployed a new revision with the new image, same error.

Is this project unmaintained now? No commits since May 😭

@sandip-bhoi-od
Copy link

This didn't fix this issue for me.

Updated requirements.txt with the newer version (which is still ancient btw), made sure to use a commit SHA instead of latest before running cloud build to push the updated Docker image, deployed a new revision with the new image, same error.

Is this project unmaintained now? No commits since May 😭

This may fix the issue for you - #476

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

Successfully merging this pull request may close these issues.

4 participants