Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#59567 - [python] webbrowser module is broken when using $BROWSER

Attached to Project: Arch Linux
Opened by Guido Masella (gdmsl) - Wednesday, 08 August 2018, 13:40 GMT
Last edited by Eli Schwartz (eschwartz) - Thursday, 09 August 2018, 23:58 GMT
Task Type Bug Report
Category Packages: Extra
Status Assigned   Reopened
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 4
Private No

Details

Description:

Jupyter notebook does not start after updating python (3.6.6-1 -> 3.7.0-3)

Additional info:

jupyter 4.1.0-6
jupyter-notebook 5.3.0-4
python-tornado 5.1.0-1

Steps to reproduce:

try to start jupyter notebook with jupyter notebook
This task depends upon

Comment by Guido Masella (gdmsl) - Wednesday, 08 August 2018, 16:27 GMT
  • Field changed: Percent Complete (100% → 0%)
I don't think  FS#59535  is related. I just found out that running `jupyter notebook --no-borwser` will successfully start jupyter notebook. Probably it is due to a bug somewere in /usr/lib/python3.7/webbrowser.py . Is that possible? If I try to call webbrowser.get() from a python script I get the same error.
Comment by Doug Newgard (Scimmia) - Wednesday, 08 August 2018, 16:28 GMT
I don't.

Python 3.7.0 (default, Jul 15 2018, 10:44:58)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.get()
<webbrowser.Chrome object at 0x7f2f2e45e7f0>
>>> print(webbrowser.__file__)
/usr/lib/python3.7/webbrowser.py
>>>
Comment by Eli Schwartz (eschwartz) - Wednesday, 08 August 2018, 16:48 GMT
Hmm, did not notice the error message was different. But if this is just running `jupyter notebook` then that works fine for me and even opens up the browser just fine.
Comment by Felix (darkthorn) - Thursday, 09 August 2018, 09:13 GMT
I can confirm this problem: Running "jupyter notebook" fails for me with the same error as in the notebook.log attached to this bug report.

Though I'd say, that it's not just Jupyter related, but more or less an issue of python itself:

$ python
Python 3.7.0 (default, Jul 15 2018, 10:44:58)
[GCC 8.1.1 20180531] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import webbrowser
>>> webbrowser.get()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/webbrowser.py", line 42, in get
register_standard_browsers()
File "/usr/lib/python3.7/webbrowser.py", line 567, in register_standard_browsers
cmd = _synthesize(cmdline, -1)
File "/usr/lib/python3.7/webbrowser.py", line 116, in _synthesize
register(browser, None, controller, update_tryorder)
TypeError: register() takes from 2 to 3 positional arguments but 4 were given
>>> print(webbrowser.__file__)
/usr/lib/python3.7/webbrowser.py
>>>
Comment by Guido Masella (gdmsl) - Thursday, 09 August 2018, 09:25 GMT
I have the same problem as Felix from python.

$ sudo pacman -Qo /usr/lib/python3.7/webbrowser.py
/usr/lib/python3.7/webbrowser.py is owned by python 3.7.0-3
Comment by Eli Schwartz (eschwartz) - Thursday, 09 August 2018, 23:58 GMT
  • Field changed: Attached to Project (Community Packages → Arch Linux)
  • Field changed: Summary ([jupyter] jupyter notebook not starting → [python] webbrowser module is broken when using $BROWSER)
  • Task reassigned to Felix Yan (felixonmars)
https://bugs.python.org/issue31014

Upstream fix: https://github.com/python/cpython/pull/7267

This has also been backported to the python 3.7 stable branch: https://github.com/python/cpython/pull/8183

The cause is that the _synthesize() function in the stdlib "webbrowser" module, which parses $BROWSER, was not included in a refactoring that broke things internally as a result. If you don't use $BROWSER then everything just works.

Loading...