これは、Cmd iで得たエラーです。電報クライアント ライブラリである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
私はパイログラムライブラリを使用し、 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に変換したところ、これが表示されました