TypeError: expected string or bytes-like object, got ‘NoneType’ when running pyinstaller with imports

I am trying to create an executable file from python but I receive the errors below. I created a clean enviorment and tried to reproduce the issue only with imports and a simple print(‘Hello World’) in the file as can be seen here:

import tkinter as tk
import threading
from tkinter import filedialog
from tkcalendar import DateEntry
from datetime import datetime
import sys
import pandas as pd
import sqlite3
from pathlib import Path
import os
import warnings
from my_functions import launch_tableau_reader
from prime_read_data import prime_read_data #issue
from prime_main_analysis import prime_main_analysis

print('Hello World')

when I removed
from tkcalendar import DateEntry
import pandas as pd
from my_functions import launch_tableau_reader
from prime_read_data import prime_read_data
from prime_main_analysis import prime_main_analysis

Pyinstaller managed to run without any issues. below are the errors I receive when I try to run pyinstaller with all the imports

166 INFO: PyInstaller: 6.9.0, contrib hooks: 2024.7
167 INFO: Python: 3.12.4
189 INFO: Platform: Windows-10-10.0.19045-SP0
189 INFO: Python environment: C:Usersguy.lamdanAppDataLocalProgramsPythonPython312
191 INFO: wrote C:Usersguy.lamdanOneDrive - Playtika Ltdnew_primetest_exe.spec
192 INFO: Module search paths (PYTHONPATH):
['C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Scripts\pyinstaller.exe',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\python312.zip',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\DLLs',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages',
 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\setuptools\_vendor',
 'C:\Users\guy.lamdan\OneDrive - Playtika Ltd\new_prime']
414 INFO: checking Analysis
416 INFO: Building because C:Usersguy.lamdanOneDrive - Playtika Ltdnew_primetest_exe.py changed
416 INFO: Running Analysis Analysis-00.toc
416 INFO: Target bytecode optimization level: 0
416 INFO: Initializing module dependency graph...
417 INFO: Caching module graph hooks...
425 INFO: Analyzing base_library.zip ...
1271 INFO: Loading module hook 'hook-encodings.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
1646 INFO: Loading module hook 'hook-heapq.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
2158 INFO: Loading module hook 'hook-pickle.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
2812 INFO: Caching module dependency graph...
2878 INFO: Looking for Python shared library...
2881 INFO: Using Python shared library: C:Usersguy.lamdanAppDataLocalProgramsPythonPython312python312.dll
2881 INFO: Analyzing C:Usersguy.lamdanOneDrive - Playtika Ltdnew_primetest_exe.py
2949 INFO: Loading module hook 'hook-_tkinter.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagestkcalendarcalendar_.py:221: SyntaxWarning: invalid escape sequence ' '
  font = kw.pop("font", "Liberation Sans 9")
3029 INFO: Loading module hook 'hook-babel.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
3284 INFO: Loading module hook 'hook-pytz.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
3481 INFO: Loading module hook 'hook-pkg_resources.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
4119 INFO: Loading module hook 'hook-platform.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
4138 INFO: Loading module hook 'hook-xml.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
4150 INFO: Loading module hook 'hook-packaging.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
4173 INFO: Loading module hook 'hook-sysconfig.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
4208 INFO: Loading module hook 'hook-jaraco.text.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks'...
4298 INFO: Loading module hook 'hook-importlib_resources.py' from 'C:\Users\guy.lamdan\AppData\Local\Programs\Python\Python312\Lib\site-packages\PyInstaller\hooks'...
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Scriptspyinstaller.exe__main__.py", line 7, in <module>
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstaller__main__.py", line 231, in _console_script_run
    run()
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstaller__main__.py", line 215, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstaller__main__.py", line 70, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerbuildingbuild_main.py", line 1216, in main
    build(specfile, distpath, workpath, clean_build)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerbuildingbuild_main.py", line 1156, in build
    exec(code, spec_namespace)
  File "C:Usersguy.lamdanOneDrive - Playtika Ltdnew_primetest_exe.spec", line 4, in <module>
    a = Analysis(
        ^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerbuildingbuild_main.py", line 556, in __init__
    self.__postinit__()
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerbuildingdatastruct.py", line 184, in __postinit__
    self.assemble()
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerbuildingbuild_main.py", line 696, in assemble
    program_scripts.append(self.graph.add_script(script))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 268, in add_script
    self._top_script_node = super().add_script(pathname)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1160, in add_script
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1232, in import_hook
    target_package, target_module_partname = self._find_head_package(
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1411, in _find_head_package
    target_package = self._safe_import_module(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1245, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1245, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1245, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1232, in import_hook
    target_package, target_module_partname = self._find_head_package(
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1411, in _find_head_package
    target_package = self._safe_import_module(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1232, in import_hook
    target_package, target_module_partname = self._find_head_package(
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1411, in _find_head_package
    target_package = self._safe_import_module(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1245, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 437, in _safe_import_hook
    ret_modules = super()._safe_import_hook(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2048, in _safe_import_hook
    target_modules = self.import_hook(
                     ^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1232, in import_hook
    target_package, target_module_partname = self._find_head_package(
                                             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1411, in _find_head_package
    target_package = self._safe_import_module(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 501, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 1792, in _safe_import_module
    self._process_imports(n)
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerlibmodulegraphmodulegraph.py", line 2591, in _process_imports
    target_modules = self._safe_import_hook(*import_info, **kwargs)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 368, in _safe_import_hook
    excluded_imports = self._find_all_excluded_imports(source_module.identifier)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependanalysis.py", line 356, in _find_all_excluded_imports
    excluded_imports.update(module_hook.excludedimports)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependimphook.py", line 316, in __getattr__
    self._load_hook_module()
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerdependimphook.py", line 383, in _load_hook_module
    self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallercompat.py", line 583, in importlib_load_source
    mod_loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerhookshook-importlib_resources.py", line 18, in <module>
    if check_requirement("importlib_resources < 1.2.0"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagesPyInstallerutilshooks__init__.py", line 414, in check_requirement
    return parsed_requirement.specifier.contains(version, prereleases=True)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagespackagingspecifiers.py", line 914, in contains
    item = Version(item)
           ^^^^^^^^^^^^^
  File "C:Usersguy.lamdanAppDataLocalProgramsPythonPython312Libsite-packagespackagingversion.py", line 198, in __init__
    match = self._regex.search(version)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'NoneType'

I was trying to create an executable file from python using pyinstaller

New contributor

Guy Lamdan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật