Import traceback with the pip package #38

Closed
opened 2024-11-04 12:09:01 +01:00 by gremond · 0 comments
Member

There is an unhandled exception thrown with the pip package of rougail and rougail-cli.
When I type rougail -h

ubuntu@chercherie:~/test$ source .venv/bin/activate
(.venv) ubuntu@chercherie:~/test$ rougail -h
Traceback (most recent call last):
  File "/home/ubuntu/test/.venv/bin/rougail", line 5, in <module>
    from rougail.cli.__main__ import main
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/__init__.py", line 35, in <module>
    from .config import RougailConfig
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/config.py", line 489, in <module>
    RougailConfig = get_rougail_config()
                    ^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/config.py", line 479, in get_rougail_config
    tiram_obj = convert.save(None)
                ^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/convert.py", line 1392, in save
    self.annotate()
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/convert.py", line 1373, in annotate
    SpaceAnnotator(self)
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/annotator/__init__.py", line 69, in __init__
    get_annotators(ANNOTATORS, f"rougail.{plugin}.annotator")
  File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/annotator/__init__.py", line 42, in get_annotators
    for pathobj in importlib.resources.files(module_name).iterdir():
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/resources/_common.py", line 22, in files
    return from_package(get_package(package))
                        ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/resources/_common.py", line 55, in get_package
    raise TypeError(f'{package!r} is not a package')
TypeError: 'rougail.structural_commandline.annotator' is not a package
(.venv) ubuntu@chercherie:~/test$ 

I have this structural_commandline.annotator import problem.

There is an unhandled exception thrown with the pip package of `rougail` and `rougail-cli`. When I type `rougail -h` ```ubuntu@chercherie:~$ cd test/ ubuntu@chercherie:~/test$ source .venv/bin/activate (.venv) ubuntu@chercherie:~/test$ rougail -h Traceback (most recent call last): File "/home/ubuntu/test/.venv/bin/rougail", line 5, in <module> from rougail.cli.__main__ import main File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/__init__.py", line 35, in <module> from .config import RougailConfig File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/config.py", line 489, in <module> RougailConfig = get_rougail_config() ^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/config.py", line 479, in get_rougail_config tiram_obj = convert.save(None) ^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/convert.py", line 1392, in save self.annotate() File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/convert.py", line 1373, in annotate SpaceAnnotator(self) File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/annotator/__init__.py", line 69, in __init__ get_annotators(ANNOTATORS, f"rougail.{plugin}.annotator") File "/home/ubuntu/test/.venv/lib/python3.11/site-packages/rougail/annotator/__init__.py", line 42, in get_annotators for pathobj in importlib.resources.files(module_name).iterdir(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/resources/_common.py", line 22, in files return from_package(get_package(package)) ^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/resources/_common.py", line 55, in get_package raise TypeError(f'{package!r} is not a package') TypeError: 'rougail.structural_commandline.annotator' is not a package (.venv) ubuntu@chercherie:~/test$ ``` I have this `structural_commandline.annotator` import problem.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stove/rougail#38
No description provided.