Public bug reported:
Steps to reproduce:
On xenial (upgraded as of 2016-04-13), perform:
#apt-get install phantomjs python-selenium
...
# dpkg --status python-selenium phantomjs | grep Version
Version: 2.48.0+dfsg1-2
Version: 2.1.1+dfsg-1
Next run this simple program, which exits with an error message (this
has worked previously, and also in other installations)
$ cat s.py
from selenium import webdriver
b = webdriver.PhantomJS()
b.get('http://www.google.com')
print b.current_url
$ python2 s.py
Traceback (most recent call last):
File "s.py", line 6, in <module>
print b.current_url
File
"/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line
454, in current_url
return self.execute(Command.GET_CURRENT_URL)['value']
File
"/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line
201, in execute
self.error_handler.check_response(response)
File
"/usr/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py",
line 102, in check_response
value = json.loads(value_json)
File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
The expected output is the current url (i.e. www.google.com in this
case).
** Affects: python-selenium (Ubuntu)
Importance: Undecided
Status: New
** Summary changed:
- python-selenium exits with error message
+ python-selenium throws exception 'No JSON object could be decoded'
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1569899
Title:
python-selenium throws exception 'No JSON object could be decoded'
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-selenium/+bug/1569899/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs