after an upgrade to ubuntu 23.04 (python 3.11), invoke can no longer import external modules

Open
#938 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
ansible, python
Domain
cli, tooling

Research direction

The report names no source files or tests. Reproduce the failure after upgrading to Ubuntu 23.04 with Python 3.11, compare importing the Ansible module in a Python REPL with importing it through Invoke's submodule, and trace the module-loading entry point. Done means external modules import successfully through Invoke without being reported as non-packages.

Written by the indexing model from the issue text.

Description

I ran into a situation where I had to upgrade invoke to the latest version to get it to run at all, then it choked importing an ansible module. I tried importing the same module at the python repl, and it imported fine. The invoke error was simply that "ansible" is not a package.

Ansible is loaded from a submodule, so it's able to import project modules, but it's having trouble with external modules.

Dominant language
Python
Stars
4.8k
Forks
412
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pyinvoke/invoke

All issues in pyinvoke/invoke

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.