Skip to content

WARNING:psyplot:Could not import plugin = psy_simple.plugin #42

Closed

Description

@captcha1

Problem description

I upgraded to Fedora 35, which uses Python 3.10 and psyplot won't start.

It seems to be related to the use of pkg_resources. On this page : https://setuptools.pypa.io/en/latest/pkg_resources.html , I see this : Use of pkg_resources is discouraged in favor of importlib.resources, importlib.metadata.

$ psyplot
INFO:numexpr.utils:NumExpr defaulting to 4 threads.
WARNING:psyplot.config.rcsetup:Failed to import plugin = psy_simple.plugin!
WARNING:psyplot.config.rcsetup:Failed to import plugin = psy_reg.plugin!
WARNING:psyplot.config.rcsetup:Failed to import plugin = psy_maps.plugin!
WARNING:psyplot:Could not import plugin = psy_simple.plugin
Traceback (most recent call last):
  File "/mumble/bin/psyplot", line 8, in <module>
    sys.exit(main())
  File "/mumble/lib/python3.10/site-packages/psyplot/__main__.py", line 73, in main
    parser.parse_known2func(args)
  File "/mumble/lib/python3.10/site-packages/funcargparse/__init__.py", line 963, in parse_known2func
    return func(**kws), remainder
  File "/mumble/lib/python3.10/site-packages/psyplot_gui/__init__.py", line 284, in start_app
    from psyplot_gui.main import MainWindow
  File "/mumble/lib/python3.10/site-packages/psyplot_gui/main.py", line 54, in <module>
    from psyplot_gui.console import ConsoleWidget
  File "/mumble/lib/python3.10/site-packages/psyplot_gui/console.py", line 52, in <module>
    import psyplot.project as psy
  File "/mumble/lib/python3.10/site-packages/psyplot/project.py", line 93, in <module>
    _versions = get_versions(requirements=False)
  File "/mumble/lib/python3.10/site-packages/psyplot/__init__.py", line 139, in get_versions
    ret[str(ep.module_name)] = mod.get_versions(requirements)
UnboundLocalError: local variable 'mod' referenced before assignment

Output of psyplot -aV

This won't start either.

Activity

  1. Chilipp commented on Nov 21, 2021

    @Chilipp
    Member

    thanks a lot for reporting @captcha1 (and my apologies for the late response!) I will fix this with the next patch within this week

  2. added a commit that references this issue on Nov 21, 2021
    9a393a6
  3. added a commit that references this issue on Nov 22, 2021
    db51d62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions