Code Monkey home page Code Monkey logo

gambatte-terminal's People

Contributors

vxgmichel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gambatte-terminal's Issues

Error when compiling Cython: Cannot convert 'unsigned int *' to Python object

Hey! First off, I think this is a super cool project. Thanks a lot for all of your work!

Unfortunately, the installation is broken for me.
When running pip3 install gambaterm, I get an error when building the gambaterm wheel. The full compiler stacktrace:

  ERROR: Command errored out with exit status 1:
   command: /Users/tobias.waslowski/projects/personal/gambaterm/venv/bin/python3 /Users/tobias.waslowski/projects/personal/gambaterm/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/tmpia2aafu7
       cwd: /private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-install-jiydfwsf/gambaterm_a9b39a9344ef4a49a377734962d452e5
  Complete output (209 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.9-universal2-cpython-39
  creating build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/console.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/run.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/keyboard_input.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/__init__.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/ssh_app_session.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/file_input.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/audio.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/controller_input.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/ssh.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/main.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/__main__.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/colors.py -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  copying gambaterm/py.typed -> build/lib.macosx-10.9-universal2-cpython-39/gambaterm
  running build_ext
  /private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-install-jiydfwsf/gambaterm_a9b39a9344ef4a49a377734962d452e5/libgambatte_ext/libgambatte.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  # distutils: language = c++
  # distutils: libraries = gambatte

  cimport numpy as np
  from libcpp.string cimport string
  from _libgambatte cimport GB as C_GB
  ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:6:0: '_libgambatte.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  # distutils: language = c++
  # distutils: libraries = gambatte

  cimport numpy as np
  from libcpp.string cimport string
  from _libgambatte cimport GB as C_GB
  ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:6:0: '_libgambatte/GB.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  # distutils: libraries = gambatte

  cimport numpy as np
  from libcpp.string cimport string
  from _libgambatte cimport GB as C_GB
  from _libgambatte cimport GetInput as C_GetInput
  ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:7:0: '_libgambatte/GetInput.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  from _libgambatte cimport GB as C_GB
  from _libgambatte cimport GetInput as C_GetInput


  cdef class GB:
      cdef C_GB c_gb
           ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:11:9: 'C_GB' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  from _libgambatte cimport GetInput as C_GetInput


  cdef class GB:
      cdef C_GB c_gb
      cdef C_GetInput c_getinput
           ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:12:9: 'C_GetInput' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          np.ndarray[np.int16_t, ndim=2] audio,
          size_t samples,
      ):
          cdef unsigned int* video_buffer = <unsigned int*> video.data
          cdef unsigned int* audio_buffer = <unsigned int*> audio.data
          result = self.c_gb.runFor(video_buffer, pitch, audio_buffer, samples)
                                    ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:29:34: Cannot convert 'unsigned int *' to Python object

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          np.ndarray[np.int16_t, ndim=2] audio,
          size_t samples,
      ):
          cdef unsigned int* video_buffer = <unsigned int*> video.data
          cdef unsigned int* audio_buffer = <unsigned int*> audio.data
          result = self.c_gb.runFor(video_buffer, pitch, audio_buffer, samples)
                                                         ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:29:55: Cannot convert 'unsigned int *' to Python object

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          self,
          np.ndarray[np.uint32_t, ndim=2] video,
          ptrdiff_t pitch,
      ):
          if video is None:
              return self.c_gb.saveState(NULL, 0)
                                         ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:53:39: Cannot convert 'void *' to Python object

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
          ptrdiff_t pitch,
      ):
          if video is None:
              return self.c_gb.saveState(NULL, 0)
          cdef unsigned int* video_buffer = <unsigned int*> video.data
          return self.c_gb.saveState(video_buffer, pitch)
                                     ^
  ------------------------------------------------------------

  libgambatte_ext/libgambatte.pyx:55:35: Cannot convert 'unsigned int *' to Python object
  Compiling libgambatte_ext/libgambatte.pyx because it changed.
  [1/1] Cythonizing libgambatte_ext/libgambatte.pyx
  Traceback (most recent call last):
    File "/Users/tobias.waslowski/projects/personal/gambaterm/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
      main()
    File "/Users/tobias.waslowski/projects/personal/gambaterm/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/tobias.waslowski/projects/personal/gambaterm/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 248, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 46, in <module>
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup
      return run_commands(dist)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
      dist.run_commands()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 974, in run_command
      super().run_command(command)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command
      cmd_obj.run()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 93, in run
      _build_ext.run(self)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 359, in run
      self.build_extensions()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 479, in build_extensions
      self._build_extensions_serial()
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build_ext.py", line 505, in _build_extensions_serial
      self.build_extension(ext)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 254, in build_extension
      _build_ext.build_extension(self, ext)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/Cython/Distutils/build_ext.py", line 130, in build_extension
      new_ext = cythonize(
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/private/var/folders/fc/j5c56kcn0rj1kx27qbwj8mvw0000gp/T/pip-build-env-kowrg3ox/overlay/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: libgambatte_ext/libgambatte.pyx
  ----------------------------------------
  ERROR: Failed building wheel for gambaterm
Failed to build gambaterm
ERROR: Could not build wheels for gambaterm which use PEP 517 and cannot be installed directly

My versions:

Python 3.9.6
cmake 3.29.6
macOS 14.5

AttributeError: 'int' object has no attribute 'xinput_select_events'

 gambaterm ~/pokemon.gbc
Traceback (most recent call last):
  File "/usr/local/bin/gambaterm", line 8, in <module>
    sys.exit(main())
  File "/home/jeason/.local/lib/python3.10/site-packages/gambaterm/main.py", line 142, in main
    with input_context as get_gb_input:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/jeason/.local/lib/python3.10/site-packages/gambaterm/keyboard_input.py", line 247, in console_input_from_keyboard_context
    with key_pressed_context(display=display) as get_pressed:
  File "/usr/lib/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/home/jeason/.local/lib/python3.10/site-packages/gambaterm/keyboard_input.py", line 119, in xlib_key_pressed_context
    term_window.xinput_select_events(
AttributeError: 'int' object has no attribute 'xinput_select_events'

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.