Can't import yython arcade

Problem description:
Cannot import the “arcade” python library

Expected behavior:
I should be able to import the “arcade” python library without errors

Actual behavior:
Importing arcade produces the following errors:

Traceback (most recent call last):
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/", line 335, in __getattr__
    return getattr(self._module, name)
AttributeError: 'NoneType' object has no attribute 'Label'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in <module>
    import arcade
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/arcade/", line 335, in <module>
    from .text_pyglet import (
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/arcade/", line 83, in <module>
    def _draw_label_with_rotation(label: pyglet.text.Label, rotation: float) -> None:
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/", line 341, in __getattr__
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/text/", line 81, in <module>
    from pyglet.text import layout, document, caret
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/text/", line 166, in <module>
    from pyglet.font.base import grapheme_break
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/font/", line 77, in <module>
    from pyglet.font.freetype import FreeTypeFont
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/font/", line 44, in <module>
    from pyglet.font.freetype_lib import *
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/font/", line 40, in <module>
    _libfreetype = pyglet.lib.load_library('freetype')
  File "/home/runner/arcadetest/venv/lib/python3.8/site-packages/pyglet/", line 168, in load_library
    raise ImportError('Library "%s" not found.' % names[0])
ImportError: Library "freetype" not found.

Steps to reproduce:

  1. Add the arcade library to the project using the package manager.
  2. Create a python script with one line: import arcade
  3. Run

Bug appears at this link:


Firefox & Chrome / Windows & Linux / PC

I found a working template in which someone was able to use the arcade python library. Give it a try and let me know if it worked.

I tried it and it didn’t work. Here’s the console output:

SoLoud dynamic link library /home/runner/LzpiO-Hkp-l/arcade/soloud/ not found. cannot open shared object file: No such file or directory
Warning, can’t initialize soloud name ‘soloud_dll’ is not defined. Sound support will be limited.
Traceback (most recent call last):
File “/home/runner/LzpiO-Hkp-l/”, line 2, in
import arcade
File “/home/runner/LzpiO-Hkp-l/arcade/”, line 226, in
from .tilemap import get_tilemap_layer
File “/home/runner/LzpiO-Hkp-l/arcade/”, line 34, in
def read_tmx(tmx_file: str) → pytiled_parser.objects.TileMap:
AttributeError: module ‘pytiled_parser’ has no attribute ‘objects’
exit status 1

Did you just run the repl or did you fork it and try to run it with your code?

they ran the repl. I checked

see if running this in shell (on your original repl) helps:

sed -i "s/];/  pkgs.freetype  \n&/" replit.nix
1 Like