Warum wird beim Importieren eines Pyrogramms eine Fehlermeldung ausgegeben, dass keine aktuelle Ereignisschleife vorhandPython

Python-Programme
Anonymous
 Warum wird beim Importieren eines Pyrogramms eine Fehlermeldung ausgegeben, dass keine aktuelle Ereignisschleife vorhand

Post by Anonymous »

Wenn ich tp import pyrogram versuche, erhalte ich diese Fehlermeldung:

Code: Select all

Traceback (most recent call last):
File "c:\Users\User\Desktop\python\bots\SVG\bott copy.py", line 1, in 
from pyrogram import Client, filters, methods
File "c:\Users\User\AppData\Local\Programs\Python\Python314\Lib\site-packages\pyrogram\__init__.py", line 40, in 
from .sync import idle, compose
File "c:\Users\User\AppData\Local\Programs\Python\Python314\Lib\site-packages\pyrogram\sync.py", line 99, in 
wrap(Methods)
~~~~^^^^^^^^^
File "c:\Users\User\AppData\Local\Programs\Python\Python314\Lib\site-packages\pyrogram\sync.py", line 95, in wrap
async_to_sync(source, name)
~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "c:\Users\User\AppData\Local\Programs\Python\Python314\Lib\site-packages\pyrogram\sync.py", line 31, in async_to_sync
main_loop = asyncio.get_event_loop()
File "c:\Users\User\AppData\Local\Programs\Python\Python314\Lib\asyncio\events.py", line 715, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
% threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'MainThread'.
und das ist buchstäblich mein ganzer Code:

Code: Select all

import pyrogram
Wenn ich versuche, Pyrogram zu aktualisieren, wird mir angezeigt, dass ich die neueste Version habe. Auch meine Python --Version ist die neueste (3.14)
Hier ist mein Python -m pip freeze:

Code: Select all

PS C:\Users\User\Desktop\python> python -m pip freeze

Code: Select all

bcrypt==4.3.0

Code: Select all

beautifulsoup4==4.14.2

Code: Select all

cachebox==5.0.4

Code: Select all

certifi==2025.10.5

Code: Select all

cffi==2.0.0

Code: Select all

charset-normalizer==3.4.4

Code: Select all

cryptography==38.0.4

Code: Select all

idna==3.11

Code: Select all

lxml==6.0.2

Code: Select all

pyaes==1.6.1

Code: Select all

pycparser==2.23

Code: Select all

Pyrogram==2.0.106

Code: Select all

pyrostep==2.11.22

Code: Select all

PySocks==1.7.1

Code: Select all

pyTelegramBotAPI==4.29.1
Ich habe Pyrogram folgendermaßen installiert:

Code: Select all

pip install pyrogram

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post