Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1025025: ImportError: cannot import name 'Application' from 'cleo'

1,224 views
Skip to first unread message

Agathe Porte

unread,
Nov 28, 2022, 3:40:02 PM11/28/22
to
Package: python3-poetry
Version: 1.1.14+dfsg-1
Severity: serious
X-Debbugs-Cc: deb...@microjoe.org

Dear Maintainer,

When invoking poetry locally, I get the following error:

Traceback (most recent call last):
File "/usr/bin/poetry", line 5, in <module>
from poetry.console import main
File "/usr/lib/python3/dist-packages/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/usr/lib/python3/dist-packages/poetry/console/application.py", line 3, in <module>
from cleo import Application as BaseApplication
ImportError: cannot import name 'Application' from 'cleo' (/usr/lib/python3/dist-packages/cleo/__init__.py)

Indeed, the installed python3-cleo package does not seem to have the
'Application' item directly available into its namespace:

Python 3.10.8 (main, Nov 4 2022, 09:21:25) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cleo
>>> dir(cleo)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__',
'__name__', '__package__', '__path__', '__spec__', '__version__',
'annotations']
>>>

The latest upstream poetry source code [1] seems to correctly use the
`cleo.application` namespace.

[1] https://github.com/python-poetry/poetry/blob/master/src/poetry/console/application.py

Thanks,

Agathe.

-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.0.0-4-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-poetry depends on:
ii python3 3.10.6-3
ii python3-cachecontrol 0.12.12-2
ii python3-cachy 0.3.0-4
ii python3-cleo 1.0.0a5-1
ii python3-clikit 0.6.2-3
ii python3-html5lib 1.1-3
ii python3-importlib-metadata 4.12.0-1
ii python3-lockfile 1:0.12.2-2.2
ii python3-packaging 21.3-1.1
ii python3-pexpect 4.8.0-3
ii python3-pkginfo 1.8.2-1
ii python3-poetry-core 1.3.2-1
ii python3-requests 2.28.1+dfsg-1
ii python3-requests-toolbelt 0.9.1-3
ii python3-shellingham 1.5.0-1
ii python3-tomlkit 0.11.6-1
ii python3-virtualenv 20.16.6+ds-1

python3-poetry recommends no packages.

python3-poetry suggests no packages.

-- no debconf information

Debian Bug Tracking System

unread,
Dec 3, 2022, 8:40:03 PM12/3/22
to
Your message dated Sun, 04 Dec 2022 01:34:56 +0000
with message-id <E1p1duC-...@fasolo.debian.org>
and subject line Bug#1025025: fixed in poetry 1.2.2+dfsg-1
has caused the Debian Bug report #1025025,
regarding ImportError: cannot import name 'Application' from 'cleo'
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


--
1025025: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1025025
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems

George Shuklin

unread,
Dec 9, 2022, 12:30:03 PM12/9/22
to
Unfortunately, 1.2.2+dfsg-1didn't fixed the problem:

dpkg -l|grep poetr
ii  python3-poetry                  1.2.2+dfsg-1

/usr/bin/poetry config virtualenvs.create false
Traceback (most recent call last):
  File "/usr/bin/poetry", line 5, in <module>
    from poetry.console.application import main
  File "/usr/lib/python3/dist-packages/poetry/console/application.py",
line 13, in <module>
    from cleo.events.console_events import COMMAND
ModuleNotFoundError: No module named 'cleo.events'
0 new messages