-4

I was trying to migrate the project from python 3.9 to python 3.11 but getting an error like 'no module name asyncio.base_events'.

I also tried using hidden imports but getting an error like no module.
Both errors are captured below

File "asyncio\___init__.py", line 21, in <module>
ModuleNotFoundError: No module named 'asyncio.base_events'
[12708] Failed to execute script 'pyi_rth_django' due to unhandled exception! 
Traceback (most recent call last):
  File "installers\pyi_rth_django.py", line 16, in <module>
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module 
  File "django\core\management\____init__.py", line 16, in <module>
    from django.apps import apps
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module 
  File "django\apps\____init__.py", line 1, in <module>
    from .config import AppConfig
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module 
  File "django\apps\config.py", line 7, in <module>
    from django.utils.deprecation import Removed InDjango41Warning
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
  File "django\utils\deprecation.py", line 1, in <module>
    import asyncio
  File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module 
  File "asyncio\____init__.py", line 21, in <module>
ModuleNotFoundError: No module named 'asyncio.base_events'
[12708] Failed to execute script 'pyi_rth_django' due to unhandled exception!


When I tried importing hidden modules then I was getting following error- 
979959 WARNING: Hidden import "asyncio.___main__" not found!
979959 WARNING: Hidden import "asyncio.base_futures" not found! 
979967 WARNING: Hidden import "asyncio.base_tasks" not found! 
979967 WARNING: Hidden import "asyncio.exceptions" not found! 
979969 WARNING: Hidden import "asyncio.format_helpers" not found! 
979969 WARNING: Hidden import "asyncio.mixins" not found! 
979969 WARNING: Hidden import "asyncio.runners" not found! 
979969 WARNING: Hidden import "asyncio.staggered" not found! 
979969 WARNING: Hidden import "asyncio.taskgroups" not found! 
979969 WARNING: Hidden import "asyncio.threads" not found! 
979977 WARNING: Hidden import "asyncio.timeouts" not found
moken
  • 3,227
  • 8
  • 13
  • 23
  • File "asyncio\__init__.py", line 21, in ModuleNotFoundError: No module named 'asyncio.base_events' [979969 WARNING: Hidden import "asyncio.runners" not found! 979969 WARNING: Hidden import "asyncio.staggered" not found! 979969 WARNING: Hidden import "asyncio.taskgroups" not found! 979969 WARNING: Hidden import "asyncio.threads" not found! 979977 WARNING: Hidden import "asyncio.timeouts" not found – Andi Tandiv Aug 18 '23 at 03:43
  • 4
    Did you name a package “asyncio”? Seems like it’s conflicting with the built-in, so try naming it something else. – Ry- Aug 18 '23 at 03:44
  • 7
    Put the error text in the question, not a comment. – Mark Ransom Aug 18 '23 at 03:44
  • Copy-paste the error into your question and format as code; don't put (links to) images in your question. – 9769953 Aug 18 '23 at 08:15
  • Please provide enough code so others can better understand or reproduce the problem. – Community Aug 18 '23 at 08:44

0 Answers0