I have the following class and function. When I try to run through it I am getting:
ImportError: cannot import name Requests
Here's my code:
from tests.global_functions.util_helper import util_get_random_customer_individual
from tests.global_functions.util_helper import util_get_random_customer_company
from requests import Requests
import random
class Customer():
def __init__(self):
request = Requests()
customer = None
if request.request_type == 'individual':
customer = util_get_random_customer_individual()
elif request.request_type == 'company':
customer = util_get_random_customer_company()
else:
print 'What the hell should I do???? HELP!?!?!?!'
The traceback is as follows:
Traceback (most recent call last):
File "C:/Users/e003048/QA/trunk/automation/selenium/src/webservices/add_customers/webservice_requests.py", line 2, in <module>
import webservices.system_environment.responses
File "C:\Users\e003048\QA\trunk\automation\selenium\src\webservices\system_environment\responses.py", line 2, in <module>
import connector
File "C:\Users\e003048\QA\trunk\automation\selenium\src\webservices\system_environment\connector.py", line 3, in <module>
import requests
File "C:\Users\e003048\QA\trunk\automation\selenium\src\webservices\system_environment\requests.py", line 3, in <module>
from customer import Customer
File "C:\Users\e003048\QA\trunk\automation\selenium\src\webservices\system_environment\customer.py", line 4, in <module>
from requests import Requests
ImportError: cannot import name Requests
Not sure what I am doing wrong here or why I would be getting this error. I am using PyCharm and there is nothing indicating that anything is wrong in the import statement.