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

Development version of ahrs triggers traceback on DeprecationWarning #77

Open
vicmortelmans opened this issue Jun 1, 2022 · 0 comments

Comments

@vicmortelmans
Copy link

I installed the released version of ahrs via pip, but since the method updateMARG in the released code doesn't feature the dt argument, I decided to use the code from git.

This version causes my script to exit with this stacktrace:

Traceback (most recent call last):
  File "/home/nymea/heliostaat/./helio.py", line 13, in <module>
    from consolemenu import *
  File "/home/nymea/.local/lib/python3.9/site-packages/consolemenu/__init__.py", line 1, in <module>
    from . import items
  File "/home/nymea/.local/lib/python3.9/site-packages/consolemenu/items/__init__.py", line 1, in <module>
    from ..console_menu import MenuItem
  File "/home/nymea/.local/lib/python3.9/site-packages/consolemenu/console_menu.py", line 8, in <module>
    from consolemenu.menu_formatter import MenuFormatBuilder
  File "/home/nymea/.local/lib/python3.9/site-packages/consolemenu/menu_formatter.py", line 3, in <module>
    from consolemenu.menu_component import Dimension, MenuHeader, MenuTextSection, MenuItemsSection, MenuFooter, MenuPrompt
  File "/home/nymea/.local/lib/python3.9/site-packages/consolemenu/menu_component.py", line 2, in <module>
    import ansiwrap as textwrap
  File "/home/nymea/.local/lib/python3.9/site-packages/ansiwrap/__init__.py", line 1, in <module>
    from .core import *
  File "/home/nymea/.local/lib/python3.9/site-packages/ansiwrap/core.py", line 6, in <module>
    import imp
  File "/usr/lib/python3.9/imp.py", line 31, in <module>
    warnings.warn("the imp module is deprecated in favour of importlib; "
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

The error is not in the ahrs module, it's a known issue in the ansiwrap module, used by the consolemenu module. The consolemenu module reports having implemented a workaround, which seems to work, but for some reason fails when I install the latest development version of ahrs.

I'm on Python 3.9.

I suppose my best option is to replace consolemenu by some other module that doesn't use ansiwrap, but still I wonder if there's some change in ahrs (since the latest released code) that triggers this error and if that can be worked around in some way...

Best regards,
Vic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant