ImportError:没有名为'requests.packages.urllib3.contrib.appengine'的模块

时间:2017-10-11 15:12:10

标签: python

我无法运行我的脚本我正在使用python3并且我安装了pyrebase及其依赖项

当我尝试在linux ubuntu

上运行我的脚本时,我得到了以下异常
Traceback (most recent call last):
  File "scrapping2fb.py", line 9, 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

有人可以帮助我

谢谢

我尝试运行的脚本

from urllib.request import urlopen ,URLError,HTTPError,Request
from socket import timeout
from bs4 import BeautifulSoup
from time import sleep
import mysql.connector
from datetime import datetime
import pyrebase
def is_exist_firebase_db_AR(siteName,title):#(siteName,title):
    global config
    global email
    global password
    firebase = pyrebase.initialize_app(config)
    db=firebase.database()
    auth = firebase.auth()
    user = auth.sign_in_with_email_and_password(email, password)
    all_items = db.child("items_ar").get(user['idToken'])
    if(all_items.each() is not None):
        for item in all_items.each():
            if(siteName in item.val().get("nomSite") and title in item.val().get("titre")):
               return 1
    return 0

1 个答案:

答案 0 :(得分:0)

这是pyrebase包的问题。

由于进入v2.16.0的{​​{3}},requests不再捆绑urllib3

pyrebase依赖于这个实现细节,并且像所有依赖于实现细节的东西一样,都被打破了。