0

这是我在 Cmd 中遇到的错误我使用的是电报客户端库的pyrogram

Traceback (most recent call last):
  File "pyroses.py", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pyrogram\client\client.py", line 39, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pyrogram\client\methods\__init__.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pyrogram\client\methods\bots\__init__.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pyrogram\client\ext\__init__.py", line 19, in <module>
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "c:\python38\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "site-packages\pyrogram\client\ext\base_client.py", line 32, in <module>
  File "site-packages\pyrogram\client\ext\base_client.py", line 80, in BaseClient
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\DarkWeb\\AppData\\Local\\Temp\\_MEI113122\\pyrogram\\client\\ext/mime.types'
[14764] Failed to execute script pyroses

只是我使用了 pyrogram 库并使用了 client.get_me() 我的代码

import pyrogram
client = pyrogram.Client(
            session_name,
            api_id=****,
            api_hash="****"
        ).start()
print(client.get())

我使用 pyinstaller -F -i icon.ico pyroses.py 将其转换为 exe,它向我展示了这个

4

0 回答 0