Giter VIP home page Giter VIP logo

raccoon's Issues

SystemError: <built-in function add_font> returned a result with an exception set

Hi,

I tried to use your player but I had an error. I am on Windows 10. Python 3.10

What I did:

  • clone the repo
  • created a venv
  • pip install -r requirements.txt
  • run directly main.py

This is the console message:

Exception: Error: [1000] Message:       Font file could not be found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\Users\guill\Documents\Python\raccoon\src\main.py", line 126, in <module>
    main()
  File "c:\Users\guill\Documents\Python\raccoon\src\main.py", line 118, in main  
    raccoons, mp, app_state, logo_fader, leaves_button_fader, fire, glow, smoke1, smoke2, particle = setup()
  File "c:\Users\guill\Documents\Python\raccoon\src\main.py", line 14, in setup  
    main_window, logo_window = gui.gui(mp, music_folder, music_files, app_state) 
  File "c:\Users\guill\Documents\Python\raccoon\src\gui\gui.py", line 246, in gui    style.load_fonts()
  File "c:\Users\guill\Documents\Python\raccoon\src\gui\style.py", line 57, in load_fonts
    default_font = dpg.add_font(id='font1', file='fonts/open_sans/opensans_regular.ttf', size=20)
  File "C:\Users\guill\Documents\Python\raccoon\.venv\lib\site-packages\dearpygui\dearpygui.py", line 4155, in add_font
    return internal_dpg.add_font(file, size, label=label, user_data=user_data, use_internal_label=use_internal_label, tag=tag, parent=parent, **kwargs)
SystemError: <built-in function add_font> returned a result with an exception set

I added /src/ at the beginning of each relative path and now it is working.
For example:

  default_font = dpg.add_font(
      id="font1", file="src/fonts/open_sans/opensans_regular.ttf", size=20
  )

I did that because using print(os.getcwd()) in main.py, it showed it was working in the "raccoon folder", not the "src" one.

Did I run the app the wrong way?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.