gurudesh/pytracebugs huggingface dataset:
# Buggy code
def run_batch(self, values):
    """Execute the query in batch mode."""
    log.sql.debug('Running SQL query (batch): "{}"'.format(self.query.lastQuery()))

    self._bind_values(values)

    db = QSqlDatabase.database()
    ok = db.transaction()
    self._check_ok("transaction", ok)

    ok = self.query.execBatch()
    try:
        self._check_ok("execBatch", ok)
    except SqlError:
        # Not checking the return value here, as we're failing anyways...
        db.rollback()
        raise

    ok = db.commit()
    self._check_ok("commit", ok)


# Traceback (AttributeError)
13:11:06 DEBUG    modes      tabbedbrowser:on_mode_left:618 Left status-input mode, focusing <qutebrowser.browser.webengine.webenginetab.WebEngineTab tab_id=1 url='https://[...].slack.com/messages/[...]/convo/[...]/'>
13:11:06 DEBUG    modes      modeman:leave:290 Ignoring leave request for KeyMode.prompt (reason aborted) as we're in mode KeyMode.normal
[...]
13:11:06 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/objreg.py", line 200, in _get_window_registry
return win.registry
AttributeError: 'NoneType' object has no attribute 'registry'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/mainwindow/prompt.py", line 335, in <lambda>
maybe=True))
File "/usr/lib/python3.6/site-packages/qutebrowser/keyinput/modeman.py", line 109, in leave
instance(win_id).leave(mode, reason, maybe=maybe)
File "/usr/lib/python3.6/site-packages/qutebrowser/keyinput/modeman.py", line 99, in instance
return objreg.get('mode-manager', scope='window', window=win_id)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/objreg.py", line 227, in get
reg = _get_registry(scope, window, tab)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/objreg.py", line 216, in _get_registry
return _get_window_registry(window)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/objreg.py", line 202, in _get_window_registry
raise RegistryUnavailableError('window')
qutebrowser.utils.objreg.RegistryUnavailableError: window

# Fixed code
def run_batch(self, values):
    """Execute the query in batch mode."""
    log.sql.debug('Running SQL query (batch): "{}"'.format(self.query.lastQuery()))

    self._bind_values(values)

    db = QSqlDatabase.database()
    ok = db.transaction()
    self._check_ok("transaction", ok)

    ok = self.query.execBatch()
    try:
        self._check_ok("execBatch", ok)
    except Error:
        # Not checking the return value here, as we're failing anyways...
        db.rollback()
        raise

    ok = db.commit()
    self._check_ok("commit", ok)
# Buggy code
def _handle_sql_errors(self):
    try:
        yield
    except sql.SqlEnvironmentError as e:
        message.error("Failed to write history: {}".format(e.text()))


# Traceback (qutebrowser.misc.sql.SqlEnvironmentError)
00:59:51 DEBUG    completion completionmodel:set_pattern:179 Setting completion pattern ''
00:59:51 DEBUG    sql        sql:__init__:174 Preparing SQL query: "SELECT url, title, strftime('%Y-%m-%d', last_atime, 'unixepoch', 'localtime') FROM CompletionHistory WHERE ((url || title) LIKE :0 escape '\')  ORDER BY last_atime DESC"
00:59:51 DEBUG    sql        sql:run:207 Running SQL query: "SELECT url, title, strftime('%Y-%m-%d', last_atime, 'unixepoch', 'localtime') FROM CompletionHistory WHERE ((url || title) LIKE :0 escape '\')  ORDER BY last_atime DESC"
00:59:51 DEBUG    sql        sql:run:210 query bindings: {':0': '%%'}
00:59:51 DEBUG    sql        sql:raise_sqlite_error:94 SQL error:
00:59:51 DEBUG    sql        sql:raise_sqlite_error:96 type: ConnectionError
00:59:51 DEBUG    sql        sql:raise_sqlite_error:97 database text: database disk image is malformed
00:59:51 DEBUG    sql        sql:raise_sqlite_error:98 driver text: Unable to fetch row
00:59:51 DEBUG    sql        sql:raise_sqlite_error:99 error code: 11
00:59:51 DEBUG    sql        debug:__exit__:265 Running completion query took 0.000379 seconds.
00:59:51 DEBUG    completion debug:__exit__:265 Set pattern  took 0.001134 seconds.
00:59:51 ERROR    misc       crashsignal:exception_hook:214 Uncaught exception
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/qutebrowser/completion/completer.py", line 260, in _update_completion
completion.set_pattern(pattern)
File "/usr/lib/python3.7/site-packages/qutebrowser/completion/completionwidget.py", line 320, in set_pattern
self.model().set_pattern(pattern)
File "/usr/lib/python3.7/site-packages/qutebrowser/completion/models/completionmodel.py", line 185, in set_pattern
cat.set_pattern(pattern)
File "/usr/lib/python3.7/site-packages/qutebrowser/completion/models/histcategory.py", line 102, in set_pattern
str(i): w for i, w in enumerate(words)})
File "/usr/lib/python3.7/site-packages/qutebrowser/misc/sql.py", line 213, in run
self._check_ok('exec', ok)
File "/usr/lib/python3.7/site-packages/qutebrowser/misc/sql.py", line 196, in _check_ok
raise_sqlite_error(msg, error)
File "/usr/lib/python3.7/site-packages/qutebrowser/misc/sql.py", line 118, in raise_sqlite_error
raise SqlEnvironmentError(msg, error)
qutebrowser.misc.sql.SqlEnvironmentError: Failed to exec query "SELECT url, title, strftime('%Y-%m-%d', last_atime, 'unixepoch', 'localtime') FROM CompletionHistory WHERE ((url || title) LIKE :0 escape '\')  ORDER BY last_atime DESC": "database disk image is malformed Unable to fetch row"

# Fixed code
def _handle_sql_errors(self):
    try:
        yield
    except sql.SqlKnownError as e:
        message.error("Failed to write history: {}".format(e.text()))
# Buggy code
def reload(self, *, force=False):
    self.predicted_navigation.emit(self.url())
    if force:
        action = QWebEnginePage.ReloadAndBypassCache
    else:
        action = QWebEnginePage.Reload
    self._widget.triggerPageAction(action)


# Traceback (qutebrowser.utils.qtutils.QtValueError)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginetab.py", line 934, in _on_predicted_navigation
self.settings.update_for_url(url)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 149, in update_for_url
value = values.get_for_url(url, fallback=False)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/configutils.py", line 160, in get_for_url
if scoped.pattern is not None and scoped.pattern.matches(url):
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/urlmatch.py", line 278, in matches
qtutils.ensure_valid(qurl)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/qtutils.py", line 139, in ensure_valid
raise QtValueError(obj)
qutebrowser.utils.qtutils.QtValueError: PyQt5.QtCore.QUrl('') is not valid

# Fixed code
def reload(self, *, force=False):
    if self.url().isValid():
        self.predicted_navigation.emit(self.url())

    if force:
        action = QWebEnginePage.ReloadAndBypassCache
    else:
        action = QWebEnginePage.Reload
    self._widget.triggerPageAction(action)
# Buggy code
def _on_predicted_navigation(self, url):
    """If we know we're going to visit an URL soon, change the settings."""
    self.settings.update_for_url(url)


# Traceback (qutebrowser.utils.qtutils.QtValueError)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginetab.py", line 934, in _on_predicted_navigation
self.settings.update_for_url(url)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 149, in update_for_url
value = values.get_for_url(url, fallback=False)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/configutils.py", line 160, in get_for_url
if scoped.pattern is not None and scoped.pattern.matches(url):
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/urlmatch.py", line 278, in matches
qtutils.ensure_valid(qurl)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/qtutils.py", line 139, in ensure_valid
raise QtValueError(obj)
qutebrowser.utils.qtutils.QtValueError: PyQt5.QtCore.QUrl('') is not valid

# Fixed code
def _on_predicted_navigation(self, url):
    """If we know we're going to visit an URL soon, change the settings."""
    qtutils.ensure_valid(url)
    self.settings.update_for_url(url)
# Buggy code
def reload(self, *, force=False):
    self.predicted_navigation.emit(self.url())
    if force:
        action = QWebPage.ReloadAndBypassCache
    else:
        action = QWebPage.Reload
    self._widget.triggerPageAction(action)


# Traceback (qutebrowser.utils.qtutils.QtValueError)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginetab.py", line 934, in _on_predicted_navigation
self.settings.update_for_url(url)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 149, in update_for_url
value = values.get_for_url(url, fallback=False)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/configutils.py", line 160, in get_for_url
if scoped.pattern is not None and scoped.pattern.matches(url):
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/urlmatch.py", line 278, in matches
qtutils.ensure_valid(qurl)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/qtutils.py", line 139, in ensure_valid
raise QtValueError(obj)
qutebrowser.utils.qtutils.QtValueError: PyQt5.QtCore.QUrl('') is not valid

# Fixed code
def reload(self, *, force=False):
    if self.url().isValid():
        self.predicted_navigation.emit(self.url())

    if force:
        action = QWebPage.ReloadAndBypassCache
    else:
        action = QWebPage.Reload
    self._widget.triggerPageAction(action)
# Buggy code
def update_for_url(self, url):
    """Update settings customized for the given tab.

    Return:
        A set of settings which actually changed.
    """
    changed_settings = set()
    for values in config.instance:
        if not values.opt.supports_pattern:
            continue

        value = values.get_for_url(url, fallback=False)

        changed = self._update_setting(values.opt.name, value)
        if changed:
            log.config.debug(
                "Changed for {}: {} = {}".format(
                    url.toDisplayString(), values.opt.name, value
                )
            )
            changed_settings.add(values.opt.name)

    return changed_settings


# Traceback (qutebrowser.utils.qtutils.QtValueError)
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginetab.py", line 934, in _on_predicted_navigation
self.settings.update_for_url(url)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 149, in update_for_url
value = values.get_for_url(url, fallback=False)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/configutils.py", line 160, in get_for_url
if scoped.pattern is not None and scoped.pattern.matches(url):
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/urlmatch.py", line 278, in matches
qtutils.ensure_valid(qurl)
File "/usr/lib/python3.6/site-packages/qutebrowser/utils/qtutils.py", line 139, in ensure_valid
raise QtValueError(obj)
qutebrowser.utils.qtutils.QtValueError: PyQt5.QtCore.QUrl('') is not valid

# Fixed code
def update_for_url(self, url):
    """Update settings customized for the given tab.

    Return:
        A set of settings which actually changed.
    """
    qtutils.ensure_valid(url)
    changed_settings = set()
    for values in config.instance:
        if not values.opt.supports_pattern:
            continue

        value = values.get_for_url(url, fallback=False)

        changed = self._update_setting(values.opt.name, value)
        if changed:
            log.config.debug(
                "Changed for {}: {} = {}".format(
                    url.toDisplayString(), values.opt.name, value
                )
            )
            changed_settings.add(values.opt.name)

    return changed_settings
# Buggy code
def _prepare_save(self):
    """Prepare saving of the file.

    Return:
        True if the file should be saved, False otherwise.
    """
    if not os.path.exists(self._configdir):
        os.makedirs(self._configdir, 0o755)
    return True


# Traceback (PermissionError)
15:48:51 DEBUG    downloads  qtnetworkdownloads:fetch:489 fetch: PyQt5.QtCore.QUrl('https://en.wikipedia.org/wiki/Canadian_National_Vimy_Memorial') -> Canadian_National_Vimy_Memorial
15:48:51 DEBUG    downloads  downloads:_on_begin_insert_row:825 _on_begin_insert_row with idx 0, webengine False
15:48:51 DEBUG    misc       standarddir:_writable_location:143 writable location for DownloadLocation: D:/
15:48:51 ERROR    misc       crashsignal:exception_hook:205 Uncaught exception
Traceback (most recent call last):
File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 875, in eventFilter
File "scripts/dev\..\..\scripts\..\qutebrowser\app.py", line 835, in _handle_key_event
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\modeman.py", line 337, in eventFilter
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\modeman.py", line 168, in _eventFilter_keypress
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\basekeyparser.py", line 311, in handle
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\modeparsers.py", line 75, in _handle_single_key
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\basekeyparser.py", line 200, in _handle_single_key
File "scripts/dev\..\..\scripts\..\qutebrowser\keyinput\keyparser.py", line 44, in execute
File "scripts/dev\..\..\scripts\..\qutebrowser\commands\runners.py", line 274, in run
File "scripts/dev\..\..\scripts\..\qutebrowser\commands\command.py", line 525, in run
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\commands.py", line 1360, in download
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\qtnetworkdownloads.py", line 386, in get
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\qtnetworkdownloads.py", line 451, in get_request
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\qtnetworkdownloads.py", line 467, in _fetch_request
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\qtnetworkdownloads.py", line 509, in fetch
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\downloads.py", line 160, in get_filename_question
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\downloads.py", line 108, in _path_suggestion
File "scripts/dev\..\..\scripts\..\qutebrowser\browser\downloads.py", line 76, in download_dir
File "scripts/dev\..\..\scripts\..\qutebrowser\utils\standarddir.py", line 101, in download
File "scripts/dev\..\..\scripts\..\qutebrowser\utils\standarddir.py", line 193, in _create
File "c:\Python\64-bit\3.4\lib\os.py", line 237, in makedirs
PermissionError: [WinError 5] Access is denied: 'D:\\'

# Fixed code
def _prepare_save(self):
    """Prepare saving of the file.

    Return:
        True if the file should be saved, False otherwise.
    """
    os.makedirs(self._configdir, 0o755, exist_ok=True)
    return True
# Buggy code
def _requires_user_interaction(self):
    baseurl = self._tab.url()
    url = self.resolve_url(baseurl)
    if url is None:
        return True
    return url.scheme() not in urlutils.WEBENGINE_SCHEMES


# Traceback (qutebrowser.browser.webelem.Error)
08:20:52 DEBUG    commands   command:run:491 command called: follow-selected
08:20:52 DEBUG    commands   command:run:506 Calling qutebrowser.browser.commands.CommandDispatcher.follow_selected(<qutebrowser.browser.commands.CommandDispatcher>, tab=False)
08:20:52 DEBUG    modes      modeman:_handle_keypress:199 match: 2, forward_unbound_keys: auto, passthrough: False, is_non_alnum: True, dry_run: False --> filter: True (focused: <PyQt5.QtWidgets.QWidget object at 0x7fd2640f1d38>)
08:20:52 DEBUG    webview    webenginetab:_follow_selected_cb:362 Found link in selection, clicking. ClickTarget ClickTarget.normal, elem adblock-update
08:20:52 DEBUG    webelem    webelem:click:405 Clicking <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<a href="#adblock-update">adblock-update</a>'> with click_target ClickTarget.normal, force_event False
08:20:52 DEBUG    webelem    webelem:is_editable:249 Checking if element is editable: <qutebrowser.browser.webengine.webengineelem.WebEngineElement html='<a href="#adblock-update">adblock-update</a>'>
08:20:52 ERROR    misc       crashsignal:exception_hook:214 Uncaught exception
Traceback (most recent call last):
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webengine/webenginetab.py", line 380, in <lambda>
self._follow_selected_cb(jsret, tab))
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webengine/webenginetab.py", line 363, in _follow_selected_cb
elem.click(click_type)
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webelem.py", line 422, in click
self._click_fake_event(click_target)
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webelem.py", line 336, in _click_fake_event
pos = self._mouse_pos()
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/webelem.py", line 327, in _mouse_pos
raise Error("Element position is out of view!")
qutebrowser.browser.webelem.Error: Element position is out of view!

# Fixed code
def _requires_user_interaction(self):
    baseurl = self._tab.url()
    url = self.resolve_url(baseurl)
    if url is None:
        return True
    if baseurl.scheme() == url.scheme():  # e.g. a qute:// link
        return False
    return url.scheme() not in urlutils.WEBENGINE_SCHEMES
# Buggy code
def _on_reply_error(self, code):
    """Handle QNetworkReply errors."""
    if code == QNetworkReply.OperationCanceledError:
        return
    self._die(self._reply.errorString())


# Traceback (AttributeError)
DEBUG    misc       qutescheme:createRequest:80 url: qute://, path: , host
DEBUG    downloads  downloads:fetch:847 fetch: PyQt5.QtCore.QUrl('qute://') -> qutebrowser-download
DEBUG    downloads  downloads:set_filename:540 Setting filename to /tmp/qutebrowser-basedir-dtdr4vwx/download
DEBUG    downloads  downloads:set_fileobj:567 buffer: 0 bytes
DEBUG    downloads  downloads:on_reply_finished:614 Reply finished, fileobj <_io.BufferedWriter name='/tmp/qutebrowser-basedir-dtdr4vwx/download/qutebrowser-download'>
DEBUG    downloads  downloads:finish_download:585 Finishing download...
DEBUG    downloads  downloads:finish_download:596 Download finished
ERROR    misc       crashsignal:exception_hook:211 Uncaught exception
Traceback (most recent call last):
File "/home/florian/proj/qutebrowser/git/qutebrowser/browser/downloads.py", line 641, in on_reply_error
self._die(self.reply.errorString())
AttributeError: 'NoneType' object has no attribute 'errorString'

# Fixed code
def _on_reply_error(self, code):
    """Handle QNetworkReply errors."""
    if code == QNetworkReply.OperationCanceledError:
        return

    if self._reply is None:
        error = "Unknown error: {}".format(debug.qenum_key(QNetworkReply, code))
    else:
        error = self._reply.errorString()

    self._die(error)
# Buggy code
def __init__(self, eventfilter, widget, parent=None):
    super().__init__(parent)
    self._filter = eventfilter
    assert widget is not None
    self._widget = widget


# Traceback (qutebrowser.config.configexc.ConfigFileErrors)
qutebrowser --version                                                                                                                                                                    [17:43:09]
17:43:35 ERROR: Error while loading config.py
Traceback (most recent call last):
File "/nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser/config/configinit.py", line 60, in early_init
configfiles.read_config_py(config_file)
File "/nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser/config/configfiles.py", line 569, in read_config_py
raise configexc.ConfigFileErrors('config.py', api.errors)
qutebrowser.config.configexc.ConfigFileErrors: Errors occurred while reading config.py:
While setting 'tabs.favicons.show': Invalid value 'True' - expected a value of type str but got bool.
While setting 'window.hide_wayland_decoration': No option 'window.hide_wayland_decoration' (this option was renamed to 'window.hide_decoration')
qutebrowser v1.3.0
Git commit:
Backend: QtWebEngine (Chromium 61.0.3163.140)

CPython: 3.6.5
Qt: 5.10.1
PyQt: 5.10.1

sip: 4.19.6
colorama: no
pypeg2: 2.15
jinja2: 2.10
pygments: 2.2.0
yaml: 3.12
cssutils: 1.0.2 $Id$
attr: 17.4.0
PyQt5.QtWebEngineWidgets: yes
PyQt5.QtWebKitWidgets: yes
pdf.js: no
sqlite: 3.22.0
QtNetwork SSL: OpenSSL 1.0.2o  27 Mar 2018

Style: QFusionStyle
Platform: Linux-4.16.7-x86_64-with-glibc2.3.4, 64bit
Linux distribution: NixOS 18.09.git.a931395 (Jellyfish) (unknown)
Frozen: False
Imported from /nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser
Qt library executable path: /nix/store/q1bnn9w3kvlgxqmy62z9mcshhcdjwh7i-qtbase-5.10.1/libexec, data path: /nix/store/q1bnn9w3kvlgxqmy62z9mcshhcdjwh7i-qtbase-5.10.1
OS Version:

--- /etc/os-release ---
NAME=NixOS
ID=nixos
VERSION="18.09.git.a931395 (Jellyfish)"
VERSION_CODENAME=jellyfish
VERSION_ID="18.09.git.a931395"
PRETTY_NAME="NixOS 18.09.git.a931395 (Jellyfish)"

Paths:
cache: /home/bart/.cache/qutebrowser
config: /home/bart/.config/qutebrowser
data: /home/bart/.local/share/qutebrowser
runtime: /run/user/1000/qutebrowser

Uptime: 0:00:00

# Fixed code
def __init__(self, eventfilter, widget, win_id, parent=None):
    super().__init__(parent)
    self._filter = eventfilter
    assert widget is not None
    self._widget = widget
    self._win_id = win_id
# Buggy code
def _install_event_filter(self):
    fp = self._widget.focusProxy()
    if fp is not None:
        fp.installEventFilter(self._mouse_event_filter)
    self._child_event_filter = mouse.ChildEventFilter(
        eventfilter=self._mouse_event_filter, widget=self._widget, parent=self
    )
    self._widget.installEventFilter(self._child_event_filter)


# Traceback (qutebrowser.config.configexc.ConfigFileErrors)
qutebrowser --version                                                                                                                                                                    [17:43:09]
17:43:35 ERROR: Error while loading config.py
Traceback (most recent call last):
File "/nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser/config/configinit.py", line 60, in early_init
configfiles.read_config_py(config_file)
File "/nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser/config/configfiles.py", line 569, in read_config_py
raise configexc.ConfigFileErrors('config.py', api.errors)
qutebrowser.config.configexc.ConfigFileErrors: Errors occurred while reading config.py:
While setting 'tabs.favicons.show': Invalid value 'True' - expected a value of type str but got bool.
While setting 'window.hide_wayland_decoration': No option 'window.hide_wayland_decoration' (this option was renamed to 'window.hide_decoration')
qutebrowser v1.3.0
Git commit:
Backend: QtWebEngine (Chromium 61.0.3163.140)

CPython: 3.6.5
Qt: 5.10.1
PyQt: 5.10.1

sip: 4.19.6
colorama: no
pypeg2: 2.15
jinja2: 2.10
pygments: 2.2.0
yaml: 3.12
cssutils: 1.0.2 $Id$
attr: 17.4.0
PyQt5.QtWebEngineWidgets: yes
PyQt5.QtWebKitWidgets: yes
pdf.js: no
sqlite: 3.22.0
QtNetwork SSL: OpenSSL 1.0.2o  27 Mar 2018

Style: QFusionStyle
Platform: Linux-4.16.7-x86_64-with-glibc2.3.4, 64bit
Linux distribution: NixOS 18.09.git.a931395 (Jellyfish) (unknown)
Frozen: False
Imported from /nix/store/cfcd2j5l3ff8j51r6ad60ka5qg043lgd-qutebrowser-1.3.0/lib/python3.6/site-packages/qutebrowser
Qt library executable path: /nix/store/q1bnn9w3kvlgxqmy62z9mcshhcdjwh7i-qtbase-5.10.1/libexec, data path: /nix/store/q1bnn9w3kvlgxqmy62z9mcshhcdjwh7i-qtbase-5.10.1
OS Version:

--- /etc/os-release ---
NAME=NixOS
ID=nixos
VERSION="18.09.git.a931395 (Jellyfish)"
VERSION_CODENAME=jellyfish
VERSION_ID="18.09.git.a931395"
PRETTY_NAME="NixOS 18.09.git.a931395 (Jellyfish)"

Paths:
cache: /home/bart/.cache/qutebrowser
config: /home/bart/.config/qutebrowser
data: /home/bart/.local/share/qutebrowser
runtime: /run/user/1000/qutebrowser

Uptime: 0:00:00

# Fixed code
def _install_event_filter(self):
    fp = self._widget.focusProxy()
    if fp is not None:
        fp.installEventFilter(self._mouse_event_filter)
    self._child_event_filter = mouse.ChildEventFilter(
        eventfilter=self._mouse_event_filter,
        widget=self._widget,
        win_id=self.win_id,
        parent=self,
    )
    self._widget.installEventFilter(self._child_event_filter)
# Buggy code
def _openurl_prepare(self, url):
    qtutils.ensure_valid(url)
    self.predicted_navigation.emit(url)


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _openurl_prepare(self, url, *, predict=True):
    qtutils.ensure_valid(url)
    if predict:
        self.predicted_navigation.emit(url)
# Buggy code
def openurl(self, url):
    raise NotImplementedError


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def openurl(self, url, *, predict=True):
    raise NotImplementedError
# Buggy code
def _count(self):
    """Convenience method to get the widget count."""
    return self._tabbed_browser.count()


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _count(self):
    """Convenience method to get the widget count."""
    return self._tabbed_browser.widget.count()
# Buggy code
def _set_current_index(self, idx):
    """Convenience method to set the current widget index."""
    cmdutils.check_overflow(idx, "int")
    self._tabbed_browser.setCurrentIndex(idx)


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _set_current_index(self, idx):
    """Convenience method to set the current widget index."""
    cmdutils.check_overflow(idx, "int")
    self._tabbed_browser.widget.setCurrentIndex(idx)
# Buggy code
def _current_index(self):
    """Convenience method to get the current widget index."""
    return self._tabbed_browser.currentIndex()


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _current_index(self):
    """Convenience method to get the current widget index."""
    return self._tabbed_browser.widget.currentIndex()
# Buggy code
def _current_widget(self):
    """Get the currently active widget from a command."""
    widget = self._tabbed_browser.currentWidget()
    if widget is None:
        raise cmdexc.CommandError("No WebView available yet!")
    return widget


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _current_widget(self):
    """Get the currently active widget from a command."""
    widget = self._tabbed_browser.widget.currentWidget()
    if widget is None:
        raise cmdexc.CommandError("No WebView available yet!")
    return widget
# Buggy code
def _do_cancel(self):
    if self._reply is not None:
        self._reply.finished.disconnect(self._on_reply_finished)
        self._reply.abort()
        self._reply.deleteLater()
        self._reply = None
    if self.fileobj is not None:
        self.fileobj.close()
    self.cancelled.emit()


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def _do_cancel(self):
    self._read_timer.stop()
    if self._reply is not None:
        self._reply.finished.disconnect(self._on_reply_finished)
        self._reply.abort()
        self._reply.deleteLater()
        self._reply = None
    if self.fileobj is not None:
        self.fileobj.close()
    self.cancelled.emit()
# Buggy code
def __init__(self, parent=None):
    super().__init__(parent)
    self.port = None
    view = QWebEngineView()
    self._set_widget(view)


# Traceback (ValueError)
16:39:44 DEBUG    init       app:_init_modules:468 Initializing websettings...
16:39:45 ERROR    misc       crashsignal:exception_hook:216 Uncaught exception
Traceback (most recent call last):
File "/bin/qutebrowser", line 11, in <module>
load_entry_point('qutebrowser==1.1.1', 'gui_scripts', 'qutebrowser')()
File "/usr/lib/python3.6/site-packages/qutebrowser/qutebrowser.py", line 188, in main
return app.run(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 137, in run
init(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 163, in init
_init_modules(args, crash_handler)
File "/usr/lib/python3.6/site-packages/qutebrowser/app.py", line 469, in _init_modules
websettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 215, in init
webenginesettings.init(args)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 297, in init
websettings.init_mappings(MAPPINGS)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 198, in init_mappings
mapping.set(value)
File "/usr/lib/python3.6/site-packages/qutebrowser/config/websettings.py", line 72, in set
self._set(value, settings=settings)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in _set
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 154, in <listcomp>
filenames = [self._find_installed(code) for code in value]
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/webenginesettings.py", line 143, in _find_installed
local_filename = spell.local_filename(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 64, in local_filename
all_installed = local_files(code)
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 51, in local_files
for matching_dict in sorted(matching_dicts, key=version, reverse=True):
File "/usr/lib/python3.6/site-packages/qutebrowser/browser/webengine/spell.py", line 36, in version
.format(filename))
ValueError: the given dictionary file name is malformed: /usr/share/qt/qtwebengine_dictionaries/en-US.bdic

# Fixed code
def __init__(self, parent=None):
    super().__init__(parent)
    self.port = None
    view = QWebEngineView()
    settings = view.settings()
    settings.setAttribute(QWebEngineSettings.JavascriptEnabled, True)
    self._set_widget(view)