question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

exec_module() missing 1 required positional argument: 'module'

See original GitHub issue

Hi. Over at https://github.com/python-pillow/Pillow/issues/4769, we’ve started receiving an error in Python 3.9 -

TypeError: exec_module() missing 1 required positional argument: 'module'

I find that our code passes with setuptools 47.3.1, but fails with 47.3.2. Investigating, I find that https://github.com/pypa/setuptools/pull/2071/files adds ExtensionFileLoader(__name__,__file__).exec_module() - calling exec_module without any arguments.

Looking at https://docs.python.org/3/library/importlib.html#importlib.machinery.ExtensionFileLoader, I would conclude that yes, exec_module does require an argument.

I’m hoping that seems like a suitably obvious bug in setuptools. Let me know if it’s not.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
alexhenriecommented, Jul 11, 2020

Shoot, you have my apologies. I have opened pull request #2249 which I believe will get everything working again.

0reactions
danielgordon10commented, Jul 25, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

add_module() missing 1 required positional argument: 'module'
I use the same file in two Google colab, ones can run, but another get a TypeError, which is 'add_module() missing 1 required...
Read more >
Missing 1 required positional argument - python - Stack Overflow
The error tells me that I need 1 more argument in the name, so I must be going wrong there, but I already...
Read more >
Issue 41268: 3.9-dev regression? TypeError: exec_module ...
3.9-dev regression? TypeError: exec_module() missing 1 required positional argument: 'module' ; 3.9-dev regression? TypeError: exec_module() ...
Read more >
How to make a function - Python Morsels
Functions have inputs (arguments) and an optional output (the return value) ... in <module> TypeError: greet() missing 1 required positional argument: 'name ...
Read more >
Try it Yourself - W3Schools Tryit Editor
... last): File "demo_function_args_error.py", line 4, in <module> my_function("Emil") TypeError: my_function() missing 1 required positional argument: 'lname'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found