Closed metabsd closed 3 years ago
>>> import urllib3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/urllib3/__init__.py", line 7, in <module>
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 11, in <module>
from .exceptions import (
File "/usr/lib/python3.8/site-packages/urllib3/exceptions.py", line 2, in <module>
from .packages.six.moves.http_client import IncompleteRead as httplib_IncompleteRead
ModuleNotFoundError: No module named 'urllib3.packages.six'
My bad ... I'm adding pysnow
and netaddr
to my custom image and I test on this version. Not sure if you have the same problem about the urllib
version miss match, So I can close this issue.
Ok, I test with your container and you don't have the same problem as I have. Sorry again.
I think that you and I are trying to accomplish some similar things. Did you ever find a resolution for adding pysnow to the upstream build and getting it to run? I unfortunately rely on pysnow for an inventory source script written in python.
Hi @dustinmhorvath
I forked the project and add pysnow library by adding servicenow.servicenow
collection. I assuming that you need that collection too. I see that the futurs collection servicenow.itsm
will be good but for now that collection is not complete and miss couple feature that I need.
For now I fix it manually by opening the container interactively and force a reinstallation of request so after I commit the container and push it.
https://hub.docker.com/repository/docker/metabsd/awx-ee
The latest version of the container is working.
When I have time for this I will figure out what happening and find the reason on request library is corrupted.
I hope that helped you. Have a nice day!
For posterity, I found a workaround by adding these bits to the execution-environment.yaml:
---
version: 1
dependencies:
galaxy: _build/requirements.yml
system: _build/bindep.txt
+ python: _build/requirements.txt
additional_build_steps:
append:
- RUN alternatives --set python /usr/bin/python3
# Reinstalling these here for some reason. Might be a python bug with these in the normal _build/requirements.txt
+ - RUN pip3 install --upgrade pip urllib3 requests six
- COPY --from=quay.io/project-receptor/receptor:0.9.7 /usr/bin/receptor /usr/bin/receptor
- RUN mkdir -p /var/run/receptor
- ADD run.sh /run.sh
- CMD /run.sh
- USER 1000
- RUN git lfs install
This seems to have fixed the issue for now. My guess is that pysnow/urllib3/six/requests have some issues going on with dependencies, and maybe with python libraries coming from the package manager. This solution is a little brutish, but seems to stomp it all out for now.