← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #222395]: HowTo use Python module requests in Sikuli (POST https )

 

Question #222395 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/222395

    Status: Answered => Open

Andrei Ionescu is still having a problem:
I downloaded the module and copy the "requests" folder here:

C:\Program Files\Sikuli X\Lib\requests

****************
Sikuli file:

from requests import session

payload = {
    'action': 'login',
    'username': USERNAME,
    'password': PASSWORD
}

****************
If I run it, I get this error:

[info] Sikuli vision engine loaded.

[info] Windows utilities loaded.

[info] VDictProxy loaded.

[error] Stopped
[error] An error occurs at line 1
[error] Error message: Traceback (most recent call last):
 File "C:\Users\AH\AppData\Local\Temp\sikuli-tmp8820935601154904929.py", line 1, in 
 from requests import session
 File "C:\Program Files\Sikuli X\Lib\requests\__init__.py", line 52, in 
 from . import utils
 File "C:\Program Files\Sikuli X\Lib\requests\utils.py", line 23, in 
 from .compat import parse_http_list as _parse_list_header
 File "C:\Program Files\Sikuli X\Lib\requests\compat.py", line 7, in 
 from .packages import charade as chardet
 File "C:\Program Files\Sikuli X\Lib\requests\packages\__init__.py", line 3, in 
 from . import urllib3
 File "C:\Program Files\Sikuli X\Lib\requests\packages\urllib3\__init__.py", line 16, in 
 from .connectionpool import (
 File "C:\Program Files\Sikuli X\Lib\requests\packages\urllib3\connectionpool.py", line 441
 except Empty as e:
 ^
SyntaxError: mism

atched input 'as' expecting COLON

******************
I ca't say if this is because of Python 2.5 or because it is just python.

Is there any way to do this is Sikuli? -regardless of the programming
language-

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.