Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: __call__() takes 3 positional arguments but 4 were given #328

Open
aorzh opened this issue May 12, 2017 · 4 comments
Open

TypeError: __call__() takes 3 positional arguments but 4 were given #328

aorzh opened this issue May 12, 2017 · 4 comments

Comments

@aorzh
Copy link

aorzh commented May 12, 2017

I use Qt 5.5.1/ PySide2 and dev version of ghost.py.
When I'm trying to use example like
`from ghost import Ghost
ghost = Ghost()

with ghost.start() as session:
page, extra_resources = session.open("http://jeanphix.me")
assert page.http_status == 200 and 'jeanphix' in page.content`
I'm getting this traceback.
https://gist.github.com/aorzh/3bec4ad0661f7d07d6c6818b7eadbf89

But just now I tested it in console and all works perfect :/

@aorzh
Copy link
Author

aorzh commented May 12, 2017

And I use Python 3.5.
It looks like some basic bug, but its strange. Looks only I got it...

@dabula-s
Copy link

dabula-s commented Aug 8, 2017

i got some exception too with session.open('http://opu.ua'), but it works, for example, with session.open('http://ac.opu.ua')
Traceback:
File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 856, in open
return self.wait_for_page_loaded(timeout=timeout)
File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1157, in wait_for_page_loaded
'Unable to load requested page', timeout)
File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1136, in wait_for
self.sleep()
File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1122, in sleep
self.ghost._app.processEvents()
TypeError: call() takes 3 positional arguments but 4 were given

@Murmele
Copy link

Murmele commented Nov 13, 2017

I get the same error, but not every time. Sometimes it works to fetch data.
Python 3.6.3
PySide2
Qt5.9

@ffigiel
Copy link

ffigiel commented Nov 28, 2017

@jeanphix care to chime in? I'm getting the same bug using the official docker image. Here's the code and traceback:

from ghost import Ghost


ghost = Ghost()
with ghost.start() as session:
    session.open('https://bittrex.com/Account/Login', timeout=60)
browser_1    | Traceback (most recent call last):
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/rq/worker.py", line 771, in perform_job
browser_1    |     rv = job.perform()
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 558, in perform
browser_1    |     self._result = self._execute()
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/rq/job.py", line 564, in _execute
browser_1    |     return self.func(*self.args, **self.kwargs)
browser_1    |   File "/browser/app/hello.py", line 7, in say_hello_to
browser_1    |     session.open('http://bittrex.com/Account/Login', timeout=60)
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 856, in open
browser_1    |     return self.wait_for_page_loaded(timeout=timeout)
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1157, in wait_for_page_loaded
browser_1    |     'Unable to load requested page', timeout)
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1136, in wait_for
browser_1    |     self.sleep()
browser_1    |   File "/usr/local/lib/python3.5/dist-packages/ghost/ghost.py", line 1122, in sleep
browser_1    |     self.ghost._app.processEvents()
browser_1    | TypeError: __call__() takes 3 positional arguments but 4 were given

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants