title: python file is showing AttributeError: module 'http' has no attribute 'client'
body: <p>I have the following Python script:</p>
  
  <pre><code>import http
  import requests
  from bs4 import BeautifulSoup
  import urllib3
  import pyrebase
  import numpy as np
  import yagmail
  import time
  from datetime import datetime, timedelta
  import sys
  import logging
  import colorama
  import csv
  from random import randint
  from numpy import genfromtxt
  import sched, time
  import threading
  import http.client
  
  import firebase_admin
  from firebase_admin import credentials
  from firebase_admin import db
  
  
  # Fetch the service account key JSON file contents
  cred = credentials.Certificate('service-account-credentials.json')
  # Initialize the app with a service account, granting admin privileges
  firebase_admin.initialize_app(cred, {
      'databaseURL': 'https://werrwrrw-catalogue.firebaseio.com'
  })
  
  
  config = {
      "apiKey": "BiXzaSdwhjwrhwjjrhwr",
      "authDomain": "whjwrhwjjrhwr.firebaseapp.com",
      "databaseURL": "https://whjwrhwjjrhwr.firebaseio.com",
      "projectId": "whjwrhwjjrhwr",
      "storageBucket": "rewrrrrr.appspot.com",
      "messagingSenderId": "606543434441"
  }
  
  
  
  firebaseuser = pyrebase.initialize_app(config)
  
  auth = firebaseuser.auth()
  dbuser = firebaseuser.database()
  
  subref = db.reference('Subcribers').get()
  
  for key, val in subref.items():
      subcriber_email = val['Email']
      print(key,subcriber_email)
  </code></pre>
  
  <p>The python file was working fine before, but now when I try to run it, it shows the following error:</p>
  
  <pre><code>&gt;&gt;Traceback (most recent call last):
    File "fax.py", line 1, in &lt;module&gt;
      import requests
    File "/Users/name/anaconda/lib/python3.6/site-packages/requests/__init__.py", line 43, in &lt;module&gt;
      import urllib3
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/__init__.py", line 8, in &lt;module&gt;
      from .connectionpool import (
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 11, in &lt;module&gt;
      from .exceptions import (
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/exceptions.py", line 2, in &lt;module&gt;
      from .packages.six.moves.http_client import (
    File "&lt;frozen importlib._bootstrap&gt;", line 961, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 950, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 646, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 616, in _load_backward_compatible
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/packages/six.py", line 203, in load_module
      mod = mod._resolve()
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/packages/six.py", line 115, in _resolve
      return _import_module(self.mod)
    File "/Users/name/anaconda/lib/python3.6/site-packages/urllib3/packages/six.py", line 82, in _import_module
      __import__(name)
    File "/Users/name/anaconda/lib/python3.6/http/client.py", line 71, in &lt;module&gt;
      import email.parser
    File "/Users/name/Desktop/Google Drive/FEBB/serverless/crwlr/email.py", line 3, in &lt;module&gt;
      from bs4 import BeautifulSoup
    File "/Users/name/anaconda/lib/python3.6/site-packages/bs4/__init__.py", line 35, in &lt;module&gt;
      from .builder import builder_registry, ParserRejectedMarkup
    File "/Users/name/anaconda/lib/python3.6/site-packages/bs4/builder/__init__.py", line 323, in &lt;module&gt;
      from . import _html5lib
    File "/Users/name/anaconda/lib/python3.6/site-packages/bs4/builder/_html5lib.py", line 20, in &lt;module&gt;
      import html5lib
    File "/Users/name/anaconda/lib/python3.6/site-packages/html5lib/__init__.py", line 19, in &lt;module&gt;
      from .serializer import serialize
    File "/Users/name/anaconda/lib/python3.6/site-packages/html5lib/serializer/__init__.py", line 5, in &lt;module&gt;
      from .htmlserializer import HTMLSerializer
    File "/Users/name/anaconda/lib/python3.6/site-packages/html5lib/serializer/htmlserializer.py", line 15, in &lt;module&gt;
      from xml.sax.saxutils import escape
    File "/Users/name/anaconda/lib/python3.6/xml/sax/saxutils.py", line 6, in &lt;module&gt;
      import os, urllib.parse, urllib.request
    File "/Users/name/anaconda/lib/python3.6/urllib/request.py", line 1350, in &lt;module&gt;
      if hasattr(http.client, 'HTTPSConnection'):
  AttributeError: module 'http' has no attribute 'client'
  </code></pre>
  
  <p>I can't really pinpoint the error. How do I read the fix the error based on the traceback above?</p>