Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circular import while importing StreamHandler #130

Closed
emphasize opened this issue Mar 16, 2023 · 3 comments
Closed

Circular import while importing StreamHandler #130

emphasize opened this issue Mar 16, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@emphasize
Copy link
Member

emphasize commented Mar 16, 2023

(ovos_ocp_files_plugin/plugin.py <--> ovos_plugin_common_play/ocp/utils.py)
stumbled accross this while checking the supported_seis

>>> from ovos_plugin_manager.ocp import StreamHandler
2023-03-16 22:07:56.215 - OVOS - ovos_utils.process_utils:PIDLock:301 - INFO - Create PIDLock in: None
2023-03-16 22:07:56.793 - OVOS - ovos_config.models:load_local:96 - DEBUG - Configuration /home/sgee/ovos-core/venv/lib/python3.10/site-packages/mycroft/configuration/mycroft.conf loaded
2023-03-16 22:07:56.805 - OVOS - ovos_config.models:load_local:96 - DEBUG - Configuration /etc/mycroft/mycroft.conf loaded
2023-03-16 22:07:56.816 - OVOS - ovos_config.models:load_local:102 - DEBUG - Configuration '/home/sgee/.config/mycroft/web_cache.json' not defined, skipping
2023-03-16 22:07:56.981 - OVOS - ovos_config.models:load_local:96 - DEBUG - Configuration /home/sgee/.config/mycroft/mycroft.conf loaded
2023-03-16 22:07:56.992 - OVOS - ovos_config.models:load_local:102 - DEBUG - Configuration '/etc/xdg/mycroft/mycroft.conf' not defined, skipping
2023-03-16 22:07:57.003 - OVOS - ovos_config.models:load_local:102 - DEBUG - Configuration '/home/sgee/.mycroft/mycroft.conf' not defined, skipping
>>> x = StreamHandler()
2023-03-16 22:08:12.254 - OVOS - ovos_utils.intents.layers:<module>:5 - ERROR - This module is deprecated, import from `ovos_workshop.skills.layers
2023-03-16 22:08:12.340 - OVOS - ovos_utils.configuration:<module>:52 - WARNING - configuration moved to the `ovos_config` package. This submodule will be removed in ovos_utils 0.1.0
2023-03-16 22:08:13.632 - OVOS - ovos_plugin_manager.utils:find_plugins:89 - ERROR - Failed to load plugin entry point ovos-ocp-files-plugin = ovos_ocp_files_plugin.plugin:OCPFilesMetadataExtractor
Traceback (most recent call last):
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_plugin_manager/utils/__init__.py", line 87, in find_plugins
    entrypoints[entry_point.name] = entry_point.load()
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2465, in load
    return self.resolve()
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2471, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_ocp_files_plugin/plugin.py", line 9, in <module>
    from ovos_plugin_common_play.ocp.status import TrackState, PlaybackType
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_plugin_common_play/__init__.py", line 5, in <module>    from ovos_plugin_common_play.ocp import OCP
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_plugin_common_play/ocp/__init__.py", line 5, in <module>
    from ovos_plugin_common_play.ocp.gui import OCPMediaPlayerGUI
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_plugin_common_play/ocp/gui.py", line 13, in <module>    from ovos_plugin_common_play.ocp.utils import is_qtav_available
  File "/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_plugin_common_play/ocp/utils.py", line 10, in <module>
    from ovos_ocp_files_plugin.plugin import OCPFilesMetadataExtractor
ImportError: cannot import name 'OCPFilesMetadataExtractor' from partially initialized module 'ovos_ocp_files_plugin.plugin' (most likely due to a circular import) (/home/sgee/ovos-core/venv/lib/python3.10/site-packages/ovos_ocp_files_plugin/plugin.py)
@NeonDaniel NeonDaniel added the bug Something isn't working label May 31, 2023
NeonDaniel added a commit that referenced this issue May 31, 2023
@NeonDaniel
Copy link
Member

I think this might come from OCP and not OPM

@NeonDaniel
Copy link
Member

Is this symptom still present or can this issue be closed?

@emphasize
Copy link
Member Author

just forgot about it. No, not experienced it since.

@github-actions github-actions bot mentioned this issue Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants