Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyinstaller error
#1
Hello, I have created a program for which I want to create an exe. file for.
But I keep getting an error, and I have no clue how to fix it.
The program is made with a Tkinter GUI and uses multiple scripts, so I won't include it here as it contains over 6000 lines
The error message can be seen here:
54206 INFO: Processing pre-safe import module hook six.moves from 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\PyInstaller\\hooks\\pre_safe_import_module\\hook-six.moves.py'.
69786 INFO: Processing pre-safe import module hook win32com from 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\pre_safe_import_module\\hook-win32com.
py'.
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 178, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\__main__.py", line 59, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 842, in main
build(specfile, distpath, workpath, clean_build)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 764, in build
exec(code, spec_namespace)
File "C:\Users\Kasper Amdi Sørensen\PycharmProjects\pythonProject2\GUIPROJECT.spec", line 7, in <module>
a = Analysis(
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 319, in __init__
self.__postinit__()
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
self.assemble()
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 481, in assemble
priority_scripts.append(self.graph.add_script(script))
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\depend\analysis.py", line 265, in add_script
self._top_script_node = super().add_script(pathname)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
self._process_imports(n)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
target_module = self._safe_import_hook(*import_info, **kwargs)[0]
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
target_modules = self.import_hook(
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
target_package, target_module_partname = self._find_head_package(
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
target_package = self._safe_import_module(
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
return super()._safe_import_module(module_basename, module_name, parent_package)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2053, in _safe_import_module
(module, co) = self._load_module(module_name, pathname, loader)
File "C:\ProgramData\Anaconda3\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2143, in _load_module
src = loader.get_source(partname)
File "<frozen importlib._bootstrap_external>", line 906, in get_source
File "<frozen importlib._bootstrap_external>", line 688, in decode_source
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 5030: invalid start byte

Does anyone have an idea on how to fix this?
Larz60+ write Jun-04-2022, 10:42 AM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Please plase error message in bbcode error tags.
Reply


Messages In This Thread
Pyinstaller error - by amdi40 - Jun-04-2022, 09:10 AM
RE: Pyinstaller error - by astroman133 - Sep-17-2022, 01:52 PM
RE: Pyinstaller error - by astroman133 - Sep-19-2022, 12:58 PM
RE: Pyinstaller error - by Axel_Erfurt - Sep-19-2022, 07:48 PM
RE: Pyinstaller error - by astroman133 - Sep-19-2022, 09:51 PM
RE: Pyinstaller error - by Axel_Erfurt - Sep-20-2022, 03:41 PM
RE: Pyinstaller error - by astroman133 - Sep-20-2022, 03:50 PM
RE: Pyinstaller error - by Axel_Erfurt - Sep-20-2022, 04:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Using pyinstaller with .ui GUI files - No such file or directory error diver999 3 3,539 Jun-27-2023, 01:17 PM
Last Post: diver999
  Pyinstaller to exe error Tyrel 3 1,817 Aug-26-2021, 06:54 AM
Last Post: buran
  error SimpleITK module with pyinstaller PythonCode12 0 1,624 Jul-08-2020, 12:07 PM
Last Post: PythonCode12
  Pyinstaller create this error :“File ”multiprocessing\connection.py“, line 691 Formationgrowthhacking 2 3,672 Apr-30-2020, 10:26 AM
Last Post: buran
  Error ' Attribute error: 'str' object has no attribute 'items'' in pyinstaller manhnt 2 8,974 Nov-04-2018, 05:51 PM
Last Post: Larz60+
  Error with using pyinstaller to convert python script in Mac OS Takeshio 2 5,430 Oct-19-2018, 02:42 PM
Last Post: Takeshio
  pyinstaller error aquilino67 3 6,230 Feb-21-2018, 11:18 PM
Last Post: aquilino67

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020