Note that there are some explanatory texts on larger screens.

plurals
  1. POfailed: ImportError: cannot import name splitgophertype
    text
    copied!<p>I get this error when I import the python modules to Robot Framework. But when I run the .py modules independently outside it works fine. Can someone tell me why do I get splitgophertype error</p> <pre><code>[ ERROR ] Error in file 'C:\Users\karthicm\DigitalMP3_Project\__init__.html' in table 'Settings': Importing test library 'C:\RF_Library\CP_Web_SignInPage.py' failed: ImportError: cannot import name splitgophertype Traceback (most recent call last): File "C:\RF_Library\CP_Web_SignInPage.py", line 1, in &lt;module&gt; from lib_Operations_UILink import ClickLink File "C:\RF_Library\lib_Operations_UILink.py", line 6, in &lt;module&gt; from lib_TestSetUp import is_element_present, Fnc_WaitForPageToLoad,\ File "C:\RF_Library\lib_TestSetUp.py", line 6, in &lt;module&gt; from selenium import webdriver File "C:\Python27\Lib\site-packages\selenium\webdriver\__init__.py", line 18, in &lt;module&gt; from .firefox.webdriver import WebDriver as Firefox File "C:\Python27\Lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 27, in &lt;module&gt; from selenium.webdriver.firefox.extension_connection import ExtensionConnection File "C:\Python27\Lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 22, in &lt;module&gt; from selenium.webdriver.remote.remote_connection import RemoteConnection File "C:\Python27\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 23, in &lt;module&gt; import urllib2 as url_request File "C:\Python27\Lib\site-packages\urllib2.py", line 110, in &lt;module&gt; from urllib import (unwrap, unquote, splittype, splithost, quote, PYTHONPATH: C:\Python27 C:\RF_Library C:\Python27\Lib\site-packages C:\Python27\lib\site-packages\robot\libraries C:\Python27\lib\site-packages C:\Python27\lib\site-packages\pip-1.2.1-py2.7.egg C:\Python27 C:\RF_Library C:\Python27\Lib\site-packages\selenium\webdriver C:\Users\karthicm\DigitalMP3_Project C:\Windows\system32\python27.zip C:\Python27\DLLs C:\Python27\lib C:\Python27\lib\plat-win C:\Python27\lib\lib-tk C:\Python27\lib\site-packages\setuptools-0.6c11-py2.7.egg-info C:\Python27\lib\site-packages\wx-2.8-msw-unicode . [ ERROR ] Error in file 'C:\Users\karthicm\DigitalMP3_Project\__init__.html' in table 'Settings': Importing test library 'C:\RF_Library\lib_AmazonMusic.py' failed: ImportError: cannot import name splitgophertype Traceback (most recent call last): File "C:\RF_Library\lib_AmazonMusic.py", line 6, in &lt;module&gt; from lib_Operations_Common import is_element_present, ConvertToSeconds, FloatEquals File "C:\RF_Library\lib_Operations_Common.py", line 6, in &lt;module&gt; from selenium.webdriver.common.action_chains import ActionChains File "C:\Python27\Lib\site-packages\selenium\webdriver\__init__.py", line 18, in &lt;module&gt; from .firefox.webdriver import WebDriver as Firefox File "C:\Python27\Lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 27, in &lt;module&gt; from selenium.webdriver.firefox.extension_connection import ExtensionConnection File "C:\Python27\Lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 22, in &lt;module&gt; from selenium.webdriver.remote.remote_connection import RemoteConnection File "C:\Python27\Lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 23, in &lt;module&gt; import urllib2 as url_request File "C:\Python27\Lib\site-packages\urllib2.py", line 110, in &lt;module&gt; from urllib import (unwrap, unquote, splittype, splithost, quote, </code></pre> <p>My test library imports are</p> <pre><code> from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait import datetime import os.path import lib_CreateMasterDictionary </code></pre> <p>One of the methods in the same test library which I am trying to use is </p> <pre><code>def initiate_setup(self, profile="default"): """ This function is initial setup for each test script The function takes 2 agrument - self and a profile for Firefox, only if necessary """ try: current_profile = False if TARGET_BROWSER == "Firefox" and profile: current_profile = setup_firefox_profile(profile) self.wd_handle = webdriver_initiate(current_profile) if TARGET_BROWSER == "Chrome" and profile: setup_Chrome_plugin(self.wd_handle, profile) #if TARGET_BROWSER == "IE" and profile: # Developer for this part of the code did not have access to IE, also IE sucks. self.wd_handle.implicitly_wait(5) self.wd_handle.maximize_window() self.base_url = HOMEPAGE_AMAZON self.verificationErrors = [] today = datetime.date.today() string_today = str(today) string_today = string_today.replace('-', '') self.string_today = string_today if not os.path.exists(TEST_DIRECTORY+"/"+string_today): os.makedirs(TEST_DIRECTORY+"/"+string_today) self.resultFile = open(RESULT_FILE, 'a') # opening file for output result_file2 = self.resultFile global ElementMappingDictionary Obj_MasterDictObj = lib_CreateMasterDictionary.CLS_MasterDictionaryBySheet(Str_ExcelPath, Str_SheetName) ElementMappingDictionary = Obj_MasterDictObj.Fnc_ReturnElementMasterDict(Str_ExcelPath, Str_SheetName) except Exception as ex: if not ex: print ex </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload