Fbs error Python 3.8

It seems that I can’t do fbs freeze from a fresh new fbs startproject
I tried on python 3.8, 3.7 and 3.6 on windows.

File "C:\Users\prato\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 192, in _run_module_as_main
   return _run_code(code, main_globals, None,
 File "C:\Users\prato\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 85, in _run_code
   exec(code, run_globals)
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\__main__.py", line 111, in run
   run_build(pyi_config, spec_file, **vars(args))
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
   PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
   build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
   exec(code, spec_namespace)
 File "C:\Users\prato\Documents\Courses\PersonalProjects\Creameme\creamemegui\target\PyInstaller\test.spec", line 18, in <module>
   pyz = PYZ(a.pure, a.zipped_data,
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
   self.__postinit__()
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
   self.assemble()
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
   self.code_dict = {
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
   key: strip_paths_in_code(code)
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\utils.py", line 652, in strip_paths_in_code
   consts = tuple(
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\utils.py", line 653, in <genexpr>
   strip_paths_in_code(const_co, new_filename)
 File "c:\users\prato\appdata\local\programs\python\envs\creameme\lib\site-packages\PyInstaller\building\utils.py", line 660, in strip_paths_in_code
   return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
Traceback (most recent call last):
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\Scripts\fbs-script.py", line 11, in <module>
   load_entry_point('fbs==0.8.4', 'console_scripts', 'fbs')()
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\lib\site-packages\fbs\__main__.py", line 17, in _main
   fbs.cmdline.main()
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\lib\site-packages\fbs\cmdline.py", line 32, in main
   fn(*args)
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\lib\site-packages\fbs\builtin_commands\__init__.py", line 120, in freeze
   freeze_windows(debug=debug)
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows
   run_pyinstaller(args, debug)
 File "C:\Users\prato\AppData\Local\Programs\Python\envs\Creameme\lib\site-packages\fbs\freeze\__init__.py", line 47, in run_pyinstaller
   run(args, check=True)
 File "C:\Users\prato\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 512, in run
   raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'test', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'C:\\Users\\prato\\Documents\\Courses\\PersonalProjects\\Cream
eme\\creamemegui\\src\\main\\icons\\Icon.ico', '--distpath', 'C:\\Users\\prato\\Documents\\Courses\\PersonalProjects\\Creameme\\creamemegui\\target', '--specpath', 'C:\\Users\\prato\\Documents\\Courses\\Persona
lProjects\\Creameme\\creamemegui\\target\\PyInstaller', '--workpath', 'C:\\Users\\prato\\Documents\\Courses\\PersonalProjects\\Creameme\\creamemegui\\target\\PyInstaller', '--additional-hooks-dir', 'C:\\Users\\
prato\\AppData\\Local\\Programs\\Python\\envs\\Creameme\\lib\\site-packages\\fbs\\freeze\\hooks', '--runtime-hook', 'C:\\Users\\prato\\Documents\\Courses\\PersonalProjects\\Creameme\\creamemegui\\target\\PyInst
aller\\fbs_pyinstaller_hook.py', 'C:\\Users\\prato\\Documents\\Courses\\PersonalProjects\\Creameme\\creamemegui\\src\\main\\python\\main.py']' returned non-zero exit status 1. 

Sorry I only have this error on python 3.8.

On 3.6 and 3.7 I have a simple FileNotFoundError: Could not find api-ms-win-crt-multibyte-l1-1-0.dll
I don’t really know why since i have installed windows sdk (with visual studio to be safe)

I fixed it !

I indeed needed to add the directory containing this file to PATH. I’m so stupid.
Sorry for the spam and thank you for the tutorial.

I have the same problem.
Can you give me more details on how you solved the problem?
What folder you added to the PATH?

Hey @gkssjovi which of the errors are you having? If it’s the first –

TypeError: an integer is required (got type bytes)

– then this is because fbs (and PyInstaller) isn’t yet compatible with Python 3.8.

Hi,
Thank you for the reply.
I’m really new on Python Development, I want to create a small app for me.
I have created this project following your tutorial

/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -m venv fbsenv
ls fbsenv/
fbsenv/bin/python3 -V
Python 3.6.8
source fbsenv/bin/activate
(fbsenv) PythonTestApp pip3 install fbs PyQt5 PyInstaller==3.4

Then I have created the project

fbs startproject

When I use fbs freeze I got this error.

(fbsenv) PythonTestApp fbs freeze
Traceback (most recent call last):
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/bin/pyinstaller", line 11, in <module>
    load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstaller')()
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/build_main.py", line 784, in build
    exec(text, spec_namespace)
  File "<string>", line 36, in <module>
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/api.py", line 676, in __init__
    self.__postinit__()
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/api.py", line 707, in assemble
    dist_nm=inm)
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/PyInstaller/building/utils.py", line 276, in checkCache
    os.makedirs(os.path.dirname(cachedfile))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 210, in makedirs
    makedirs(head, mode, exist_ok)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/Users/gkssjovi/Library/Application Support/pyinstaller/bincache00_py36_64bit/_struct'
Traceback (most recent call last):
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/bin/fbs", line 11, in <module>
    load_entry_point('fbs==0.8.6', 'console_scripts', 'fbs')()
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/builtin_commands/__init__.py", line 114, in freeze
    freeze_mac(debug=debug)
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/freeze/mac.py", line 22, in freeze_mac
    run_pyinstaller(args, debug)
  File "/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/freeze/__init__.py", line 47, in run_pyinstaller
    run(args, check=True)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'HelloWorld', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', '/Users/gkssjovi/Desktop/PythonTestApp/target/Icon.icns', '--osx-bundle-identifier', 'com.martin.helloworld', '--distpath', '/Users/gkssjovi/Desktop/PythonTestApp/target', '--specpath', '/Users/gkssjovi/Desktop/PythonTestApp/target/PyInstaller', '--workpath', '/Users/gkssjovi/Desktop/PythonTestApp/target/PyInstaller', '--additional-hooks-dir', '/Users/gkssjovi/Desktop/PythonTestApp/fbsenv/lib/python3.6/site-packages/fbs/freeze/hooks', '--runtime-hook', '/Users/gkssjovi/Desktop/PythonTestApp/target/PyInstaller/fbs_pyinstaller_hook.py', '/Users/gkssjovi/Desktop/PythonTestApp/src/main/python/main.py']' returned non-zero exit status 1.

Sorry, I saw is working now if I use sudo command.
Probably when I have tried before it was a problem with the python version.
I have another problem now. I use dark them on my mac os, and it seems it not recognised when I run the app.
Can you point me to the wright direction since I’m very new on this.