ModuleNotFoundError: No module named 'tomllib'
See original GitHub issueDescribe the bug
When I run tests in Travis CI against Python3.11-dev I get the following error:
$ coverage run --branch pedantic/tests/tests_main.py
Traceback (most recent call last):
File "/home/travis/virtualenv/python3.11-dev/bin/coverage", line 5, in <module>
from coverage.cmdline import main
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11-dev/lib/python3.11/site-packages/coverage/__init__.py", line 15, in <module>
from coverage.control import Coverage, process_startup
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11-dev/lib/python3.11/site-packages/coverage/control.py", line 20, in <module>
from coverage.collector import Collector, CTracer
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11-dev/lib/python3.11/site-packages/coverage/collector.py", line 10, in <module>
from coverage.config import CoverageConfig
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11-dev/lib/python3.11/site-packages/coverage/config.py", line 16, in <module>
from coverage.tomlconfig import TomlConfigParser, TomlDecodeError
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/travis/virtualenv/python3.11-dev/lib/python3.11/site-packages/coverage/tomlconfig.py", line 16, in <module>
import tomllib # pylint: disable=import-error
^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'tomllib'
To Reproduce How can we reproduce the problem? Please be specific. Don’t link to a failing CI job. Answer the questions below:
- What version of Python are you using?
Python 3.11.0a3+ - What version of coverage.py shows the problem?
6.4 - What code shows the problem? Does not matter.
- What commands did you run?
coverage run --branch pedantic/tests/tests_main.py
Expected behavior Run tests with coverage.
Additional context Nothing.
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Python 3.11 ModuleNotFoundError: No module named 'tomllib'
Describe the bug In Python 3.11 it is raising exception with ModuleNotFoundError. To Reproduce Install Python 3.11 $ black .
Read more >ModuleNotFoundError: No module named 'toml-python'
Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'toml-python' How to remove the Module.
Read more >numpy - Unable to install python package "toml" - Stack Overflow
Apparently the problem was that I have python 2 and 3, I was installing toml in 3. Running: sudo -H pip2 install toml....
Read more >[Fixed] ModuleNotFoundError: No module named 'toml' - Finxter
Quick Fix: Python raises the ImportError: No module named 'toml' when it cannot find the library toml . The most frequent source of...
Read more >Update Python `3.11-dev` - Travis CI Community
ModuleNotFoundError: No module named 'tomllib' · Issue #1390 · nedbat/coveragepy · GitHub · @Montana Please will you update 3.11-dev to use ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And Travis CI have now updated
3.11-devand it now points to:🎉
https://travis-ci.community/t/update-python-3-11-dev/13039/2?u=hugovk
This is now released as part of coverage 6.4.1.