thisbejim / Pyrebase

A simple python wrapper for the Firebase API.
2.06k stars 528 forks source link

ImportError: No module named 'requests.packages.urllib3.contrib.appengine' #162

Open anomaddev opened 7 years ago

anomaddev commented 7 years ago

Hey,

Working on a pi setup to control my outdoor hydroponics garden and I'm just now getting an error when running my script. Here's the error: pi@gardenpi:~/GardenPi $ sudo python3 testing.py Traceback (most recent call last): File "testing.py", line 2, in <module> import pyrebase File "/usr/local/lib/python3.4/dist-packages/pyrebase/__init__.py", line 1, in <module> from .pyrebase import initialize_app File "/usr/local/lib/python3.4/dist-packages/pyrebase/pyrebase.py", line 19, in <module> from requests.packages.urllib3.contrib.appengine import is_appengine_sandbox ImportError: No module named 'requests.packages.urllib3.contrib.appengine'

I saw an issue with this that was dated back in 2016, but the solution was running the code with Python3 with I am already doing. Any help with this would be great!

Thanks, Justin

robertlayton commented 7 years ago

It looks like the latest pyrebase doesn't play nice with the latest requests package. Install the requests version that is listed in requirements.txt instead (worked for me)

cgoulart35 commented 1 year ago

Hi @robertlayton, I am running into this same runtime error. I moved my app's files to my new Raspberry Pi from my old one (old Ubuntu 64 -> new Raspberry Pi OS 64). When I start my app in a docker container (I use docker-compose) I get this same error message on importing Pyrebase4.

I am not sure why I would be able to build and run my app successfully on my old device on Ubuntu 64 (which also has older versions of docker/docker-compose) but not on my new device on Pi OS...

Here are my dependencies/requirements.txt installed in the container: APScheduler==3.10.1 debugpy==1.6.7 df2img==0.2.10 emoji==2.2.0 httpx==0.23.3 ipython==8.12.0 nbformat==5.8.0 nextcord==2.4.2 nextcord-ext-menus==1.5.6 pandas==2.0.0 Pyrebase4==4.6.0 quart==0.18.3 yt-dlp==2023.3.4

I have tried reinstalling docker and using different versions (also made sure to be using the aarch64 docker versions as I am now on Pi OS 64).

cgoulart35 commented 1 year ago

Hi @robertlayton, I am running into this same runtime error. I moved my app's files to my new Raspberry Pi from my old one (old Ubuntu 64 -> new Raspberry Pi OS 64). When I start my app in a docker container (I use docker-compose) I get this same error message on importing Pyrebase4.

I am not sure why I would be able to build and run my app successfully on my old device on Ubuntu 64 (which also has older versions of docker/docker-compose) but not on my new device on Pi OS...

Here are my dependencies/requirements.txt installed in the container: APScheduler==3.10.1 debugpy==1.6.7 df2img==0.2.10 emoji==2.2.0 httpx==0.23.3 ipython==8.12.0 nbformat==5.8.0 nextcord==2.4.2 nextcord-ext-menus==1.5.6 pandas==2.0.0 Pyrebase4==4.6.0 quart==0.18.3 yt-dlp==2023.3.4

I have tried reinstalling docker and using different versions (also made sure to be using the aarch64 docker versions as I am now on Pi OS 64).

Think I figured out the issue. https://github.com/cgoulart35/GBot/commit/8918e6842acd7b08cda3fa26b0350f406bbe3f50

https://stackoverflow.com/questions/76175487/sudden-importerror-cannot-import-name-appengine-from-requests-packages-urlli

Siam-Rayhan1 commented 10 months ago

Hey my python version is 3.11.4 and I'm getting the same error ModuleNotFoundError: No module named 'requests.packages.urllib3.contrib.appengine Could you guys help me to solve it??

TLBritts123 commented 9 months ago

Hey my python version is 3.11.4 and I'm getting the same error ModuleNotFoundError: No module named 'requests.packages.urllib3.contrib.appengine Could you guys help me to solve it??

were you able to solve? i have the same problem

AsifArmanRahman commented 9 months ago

Try this firebase-rest-api

Helias commented 7 months ago

I've solved in this way https://stackoverflow.com/questions/78017690/python-telegram-bot-v13-11-incompatible-with-requests-and-urllib3-libraries-usin/78017691#78017691

stagebo commented 2 weeks ago

ys help me to solv

pip install urllib3==1.26.15