Toolchain build kivy: TypeError: join() argument must be str,....

499 views
Skip to first unread message

manuel....@gmail.com

unread,
Aug 26, 2021, 3:51:04 PM8/26/21
to Kivy users support

Cython                    0.29.24
kivy-ios                  1.2.1
Python                   3.9.2

When i try to build kivy i get:

[INFO    ] Building with 8 processes, where supported
[INFO    ] Want to build ['kivy']
[INFO    ] Loaded recipe kivy (depends of ['sdl2', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'ios', 'pyobjus', 'python', 'host_setuptools3'], optional are [])
[INFO    ] Loaded recipe sdl2 (depends of [], optional are [])
[INFO    ] Loaded recipe sdl2_image (depends of ['sdl2'], optional are [])
[INFO    ] Loaded recipe sdl2_mixer (depends of ['sdl2'], optional are [])
[INFO    ] Loaded recipe sdl2_ttf (depends of ['sdl2', 'freetype'], optional are [])
[INFO    ] Loaded recipe ios (depends of ['python'], optional are [])
[INFO    ] Loaded recipe pyobjus (depends of ['python'], optional are [])
[INFO    ] Loaded recipe python (depends of ['python3'], optional are [])
[INFO    ] Loaded recipe host_setuptools3 (depends of ['openssl', 'hostpython3', 'python3'], optional are [])
[INFO    ] Loaded recipe freetype (depends of [], optional are [])
[INFO    ] Loaded recipe python3 (depends of ['hostpython3', 'libffi', 'openssl'], optional are [])
[INFO    ] Loaded recipe openssl (depends of [], optional are [])
[INFO    ] Loaded recipe hostpython3 (depends of ['hostlibffi', 'hostopenssl'], optional are [])
[INFO    ] Loaded recipe libffi (depends of [], optional are [])
[INFO    ] Loaded recipe hostlibffi (depends of [], optional are [])
[INFO    ] Loaded recipe hostopenssl (depends of [], optional are [])
[INFO    ] Build order is ['freetype', 'hostlibffi', 'hostopenssl', 'libffi', 'openssl', 'sdl2', 'hostpython3', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'host_setuptools3', 'python', 'ios', 'pyobjus', 'kivy']
[INFO    ] Recipe order is ['freetype', 'hostlibffi', 'hostopenssl', 'libffi', 'openssl', 'sdl2', 'hostpython3', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'python3', 'host_setuptools3', 'ios', 'pyobjus', 'kivy']
[INFO    ] Include dir added: {arch.arch}/freetype
[INFO    ] Include dir added: {arch.arch}/hostlibffi
[INFO    ] Include dir added: {arch.arch}/ffi
[INFO    ] Include dir added: {arch.arch}/openssl
[INFO    ] Include dir added: common/sdl2
[INFO    ] Global: hostpython located at /Users/brigei/dist/hostpython3/bin/python
[INFO    ] Global: hostpgen located at /Users/brigei/dist/hostpython3/bin/pgen
[INFO    ] Include dir added: common/sdl2_image
[INFO    ] Include dir added: common/sdl2_mixer
[INFO    ] Include dir added: common/sdl2_ttf
[DEBUG   ] Cached result: Download freetype. Ignoring
[INFO    ] Extract freetype
[INFO    ] Extract freetype for x86_64
[WARNING ] Error extracting the archive /Users/brigei/.cache/freetype-freetype-2.5.5.tar.bz2
[WARNING ] This is usually caused by a corrupt download. The file will be removed and re-downloaded on the next run.
[WARNING ] /Users/brigei/.cache/freetype-freetype-2.5.5.tar.bz2
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/toolchain", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1519, in main
    ToolchainCL()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1276, in __init__
    getattr(self, args.command)()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1337, in build
    build_recipes(args.recipe, ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1127, in build_recipes
    recipe.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 698, in execute
    self.extract()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 73, in _cache_execution
    f(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 742, in extract
    self.extract_arch(arch.arch)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 746, in extract_arch
    dest_dir = join(build_dir, self.archive_root)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/posixpath.py", line 90, in join
    genericpath._check_arg_types('join', a, *p)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/genericpath.py", line 152, in _check_arg_types
    raise TypeError(f'{funcname}() argument must be str, bytes, or '
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'

Robert

unread,
Aug 26, 2021, 4:04:01 PM8/26/21
to Kivy users support
Perhaps:

[WARNING ] Error extracting the archive /Users/brigei/.cache/freetype-freetype-2.5.5.tar.bz2
[WARNING ] This is usually caused by a corrupt download. The file will be removed and re-downloaded on the next run.
[WARNING ] /Users/brigei/.cache/freetype-freetype-2.5.5.tar.bz2

remi bidjada

unread,
Aug 26, 2021, 7:24:54 PM8/26/21
to Kivy users support
Do:
toolchain build freetype==2.10.0

before building kivy.

The version freetype that comes with kivy-ios is not available, so changing the version will help.

manuel....@gmail.com

unread,
Aug 27, 2021, 7:09:58 AM8/27/21
to Kivy users support
Hi,

thanks for your answers. When i try to build freetype==2.10.0 i get this. When i first change the directory in terminal to .cache it seems to work. What is the difference? Also the version of freetype is a different. How can i update the current 2.5.5 to the recommended 2.10.0 ?

[INFO    ] Building with 8 processes, where supported
[INFO    ] Want to build ['freetype==2.10.0']
[INFO    ] Loaded recipe freetype==2.10.0 (depends of [], optional are [])
[INFO    ] Build order is ['freetype==2.10.0']
[INFO    ] Recipe order is ['freetype']

[INFO    ] Include dir added: {arch.arch}/freetype
[DEBUG   ] Cached result: Download freetype. Ignoring
[INFO    ] Extract freetype
[INFO    ] Extract freetype for x86_64
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/toolchain", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1519, in main
    ToolchainCL()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1276, in __init__
    getattr(self, args.command)()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1337, in build
    build_recipes(args.recipe, ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 1127, in build_recipes
    recipe.execute()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 698, in execute
    self.extract()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 73, in _cache_execution
    f(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 742, in extract
    self.extract_arch(arch.arch)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 746, in extract_arch
    dest_dir = join(build_dir, self.archive_root)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 689, in archive_root
    value = self.get_archive_rootdir(self.archive_fn)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/toolchain.py", line 518, in get_archive_rootdir
    archive = tarfile.open(filename)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tarfile.py", line 1611, in open
    return func(name, "r", fileobj, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/tarfile.py", line 1675, in gzopen
    fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/gzip.py", line 173, in __init__
    fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/Users/brigei/.cache/freetype-freetype-2.10.0.tar.bz2'

remi bidjada

unread,
Aug 27, 2021, 11:27:10 AM8/27/21
to Kivy users support
Try "toolchain clean freetype" first before building.

If it does not work, navigate to: " /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/kivy_ios/recipes/"
open the "init.py" and change the version of freetype in this file.
once done, try: "toolchain build freetype".
MAKE SURE TO CLEAN FREETYPE (toolchain clean freetype) AFTER EACH ATTEMPT THAT DOES NOT WORK.

manuel....@gmail.com

unread,
Aug 28, 2021, 9:19:02 AM8/28/21
to Kivy users support
Hi,

thanks for your answers. When i try to build freetype==2.10.0 i get this. When i first change the directory in terminal to .cache it seems to work. What is the difference? Also the version of freetype is a different. How can i update the current 2.5.5 to the recommended 2.10.0 ?


Reply all
Reply to author
Forward
0 new messages