robotframework-requests: Python 3.5.2 issue - Importing test library 'RequestsLibrary' failed: ImportError
Have an issue on Python 3.5.2 (32bit and 64bit) on Windows 7 64bit.
[ROBOT_35_64] λ robot robot_data.robot
[ ERROR ] Error in file 'C:\_GITHUB\_learnpython\playground\robot_data.robot': Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary'
Traceback (most recent call last):
None
PYTHONPATH:
c:\users\me\envs\WRONG_VENV\scripts\python35.zip
c:\users\me\envs\WRONG_VENV\DLLs
c:\users\me\envs\WRONG_VENV\lib
c:\users\me\envs\WRONG_VENV\scripts
C:\Python35_64\Lib
C:\Python35_64\DLLs
c:\users\me\envs\WRONG_VENV
c:\users\me\envs\WRONG_VENV\lib\site-packages
[ ERROR ] Error in file 'C:\_GITHUB\_learnpython\playground\robot_data.robot': Importing test library 'RequestsLibrary' failed: ImportError: No module named 'RequestsLibrary'
Traceback (most recent call last):
None
PYTHONPATH:
c:\users\me\envs\WRONG_VENV\scripts\python35.zip
c:\users\me\envs\WRONG_VENV\DLLs
c:\users\me\envs\WRONG_VENV\lib
c:\users\me\envs\WRONG_VENV\scripts
C:\Python35_64\Lib
C:\Python35_64\DLLs
c:\users\me\envs\WRONG_VENV
c:\users\me\envs\WRONG_VENV\lib\site-packages
==============================================================================
Robot Data
==============================================================================
001 Simple Log Test Case | PASS |
------------------------------------------------------------------------------
002 Easy Robot Test | PASS |
------------------------------------------------------------------------------
003 GET (extern) :: GET http://httpbin.org/headers | FAIL |
No keyword with name 'Create Session' found.
------------------------------------------------------------------------------
004 GET (extern) :: GET http://httpbin.org/headers | FAIL |
No keyword with name 'Create Session' found.
------------------------------------------------------------------------------
005 POST (extern) :: https://www.hurl.it/ | FAIL |
No keyword with name 'Create Session' found.
------------------------------------------------------------------------------
Robot Data | FAIL |
5 critical tests, 2 passed, 3 failed
5 tests total, 2 passed, 3 failed
==============================================================================
Output: C:\_GITHUB\_learnpython\playground\output.xml
Log: C:\_GITHUB\_learnpython\playground\log.html
Report: C:\_GITHUB\_learnpython\playground\report.html
Take a note on PYTHONPATH which is searched on. I did an venv
mkvirtualenv ROBOT_35_64 -p C:\Python35_64\python.exe
Then installed robot and the library under that venv.
Shoud the library not be searched somewhere in /c/Users/me/Envs/ROBOT_35_64/ ... ?
[ROBOT_35_64] λ pip list
pip (9.0.1)
robotframework (3.0)
robotframework-requests (0.4.6)
setuptools (32.3.1)
wheel (0.30.0a0)
C:\_GITHUB\_learnpython\playground
[ROBOT_35_64] λ which pip
/c/Users/me/Envs/ROBOT_35_64/Scripts/pip
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (7 by maintainers)
I have found something interessting. This is content of
c:\users\me\envs\ROBOT_35_64\scripts\robot.batin my ROBOT_35_64 venv :pybot works!!!
c:\users\me\envs\ROBOT_35_64\scripts\pybot.batworks, cause it does not mess up paths:So I think this is an issue of Robot Framework or of my local Python installations but not issue of your library.
can you try with
pybotinsteadrobot