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

ModuleNotFoundError: No module named 'urllib3.packages.six.moves' #19

Closed
ping-localhost opened this issue Dec 30, 2023 · 5 comments
Closed
Assignees

Comments

@ping-localhost
Copy link

Just tried to install this on an simple alpine based docker LXC, but running the docker compose and starting the container results in the following errors:

Traceback (most recent call last):
  File "/app/run.py", line 9, in <module>
    import urllib3
  File "/usr/local/lib/python3.12/site-packages/urllib3/__init__.py", line 11, in <module>
    from . import exceptions
  File "/usr/local/lib/python3.12/site-packages/urllib3/exceptions.py", line 3, in <module>
    from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
Sleeping for 1h...
Traceback (most recent call last):
  File "/app/run.py", line 9, in <module>
    import urllib3
  File "/usr/local/lib/python3.12/site-packages/urllib3/__init__.py", line 11, in <module>
    from . import exceptions
  File "/usr/local/lib/python3.12/site-packages/urllib3/exceptions.py", line 3, in <module>
    from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
Sleeping for 1h...
@AndrewPaglusch
Copy link
Owner

AndrewPaglusch commented Jan 1, 2024

@ping-localhost Can you please share your Compose file with me? Thanks!

@AndrewPaglusch AndrewPaglusch self-assigned this Jan 1, 2024
@ping-localhost
Copy link
Author

ping-localhost commented Jan 1, 2024

@ping-localhost Can you please share your Compose file with me? Thanks!

version: "3.5"
services:
  proxmox-cloudflare-sync:
    build: .
    container_name: proxmox-cloudflare-sync
    restart: always
    environment:
      NETWORK: 192.168.0.0/24
      PROXMOX_URL: https://192.168.0.36:8006
      PROXMOX_NODES_LIST: elitedesk,pve
      PROXMOX_TOKEN_NAME: api-user@pam!main
      PROXMOX_TOKEN: xxxxxxxxxx
      CLOUDFLARE_TOKEN: xxxxxxxxxx
      CLOUDFLARE_ZONE: foo.bar

Just followed the steps in the README. 😅

@AndrewPaglusch
Copy link
Owner

I'm able to reproduce your problem. I'll take a deeper look and see if I can figure out why this broke.

$ git clone https://github.com/AndrewPaglusch/Proxmox-To-Cloudflare-Sync.git
$ cd Proxmox-To-Cloudflare-Sync/
$ mv docker-compose.yml.EXAMPLE docker-compose.yml
$ docker-compose up -d
$ docker logs proxmox-cloudflare-sync
Traceback (most recent call last):
  File "/app/run.py", line 9, in <module>
    import urllib3
  File "/usr/local/lib/python3.12/site-packages/urllib3/__init__.py", line 11, in <module>
    from . import exceptions
  File "/usr/local/lib/python3.12/site-packages/urllib3/exceptions.py", line 3, in <module>
    from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'urllib3.packages.six.moves'
Sleeping for 1h...

@AndrewPaglusch
Copy link
Owner

I just pushed a commit that should fix this issue. It seems the most recent version of Python isn't compatible with aiohttp. I pinned it to v3.11. See here: aio-libs/aiohttp#7739. Please let me know if you can build/run the image now.

@ping-localhost
Copy link
Author

The project now builds and runs, thank you!

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

No branches or pull requests

2 participants