1

I am trying to use QGIS 3 as it has a feature the previous version does not have, and have run into an issue when trying to run the semi-automatic classification system plug-in. Instead of opening up the plug-in, it displays the following error log. Has anyone had this issue before or have any idea how to resolve this issue?

Couldn't load plugin 'SemiAutomaticClassificationPlugin' due to an error when calling its classFactory() method 

OSError: [Errno 9] Bad file descriptor: 'dev/fd/18' 
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1353, in 
    fontManager = json_load(_fmcache)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 888, in json_load
    with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/samuelkozlowski/.matplotlib/fontlist-v300.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 337, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/samuelkozlowski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/__init__.py", line 65, in classFactory
    from .semiautomaticclassificationplugin import SemiAutomaticClassificationPlugin
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/samuelkozlowski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/semiautomaticclassificationplugin.py", line 74, in 
    from .ui.semiautomaticclassificationplugindialog import SemiAutomaticClassificationPluginDialog
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/samuelkozlowski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/semiautomaticclassificationplugindialog.py", line 39, in 
    from .ui_semiautomaticclassificationplugin_scatter_plot import Ui_ScatterPlot
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/samuelkozlowski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/ui_semiautomaticclassificationplugin_scatter_plot.py", line 453, in 
    from .scatterwidget2 import ScatterWidget2
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/samuelkozlowski/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/SemiAutomaticClassificationPlugin/ui/scatterwidget2.py", line 44, in 
    from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigCanvas
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/backends/__init__.py", line 9, in 
    from matplotlib.backend_bases import _Backend
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 46, in 
    from matplotlib import (
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/textpath.py", line 8, in 
    from matplotlib import cbook, dviread, font_manager, rcParams
  File "/Applications/QGIS3.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 674, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1363, in 
    _rebuild()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 1344, in _rebuild
    fontManager = FontManager()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 978, in __init__
    ttffiles = findSystemFonts(paths) + findSystemFonts()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 270, in findSystemFonts
    fontfiles.update(OSXInstalledFonts(fontext=fontext))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 218, in OSXInstalledFonts
    for directory in directories
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 220, in 
    for path in list_fonts(directory, ext)]
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 157, in list_fonts
    for path in filter(Path.is_file, Path(directory).glob("**/*.*"))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/matplotlib/font_manager.py", line 156, in 
    return [str(path)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1100, in glob
    for p in selector.select_from(self):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 559, in _select_from
    for starting_point in self._iterate_directories(parent_path, is_dir, scandir):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 549, in _iterate_directories
    for p in self._iterate_directories(path, is_dir, scandir):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 549, in _iterate_directories
    for p in self._iterate_directories(path, is_dir, scandir):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 547, in _iterate_directories
    if entry.is_dir() and not entry.is_symlink():
OSError: [Errno 9] Bad file descriptor: 'dev/fd/18'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.