question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems running TensorKart (./record.py) with MuPen64Plus!

See original GitHub issue

Hi!

After installing all the requirements and dependencies, I ran the following command along with an instance of MuPen64Plus running Mario Kart 64.

Input:

./record.py

This is what happened…

Output:

iMac:TensorKart shyamalsuhanachandra$ ./record.py
2017-01-19 19:37:50.129 Python[14589:68221] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/m1/b_t9_2151y30ryvtr_2gznch0000gp/T/org.python.python.savedState
Traceback (most recent call last):
  File "./record.py", line 207, in <module>
    app.frame = MainWindow()
  File "./record.py", line 30, in __init__
    self.create_main_panel()
  File "./record.py", line 49, in create_main_panel
    img = wx.Image(320,240)
  File "/usr/local/lib/python2.7/site-packages/wx-3.0-osx_cocoa/wx/_core.py", line 2882, in __init__
    _core_.Image_swiginit(self,_core_.new_Image(*args, **kwargs))
TypeError: String or Unicode type required

How can I fix this problem?

Note: I didn’t make any changes to the code besides install the dependencies with brew instead of pip in certain scenarios. Also, the screen in MuPen64Plus flickers quite a bit, what should I do to prevent this from happening?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
simicvmcommented, Aug 31, 2017

Hi. I managed to solve the problem in this way. Just edit these lines.

# Images
img = wx.EmptyImage(320,240)
self.image_widget = wx.StaticBitmap(self.img_panel, wx.ID_ANY, wx.EmptyBitmap(320,240))
def take_screenshot(self):
    screen = wx.ScreenDC()
    bmp = wx.EmptyBitmap(Screenshot.SRC_W, Screenshot.SRC_H)
    mem = wx.MemoryDC(bmp)
    mem.Blit(0, 0, Screenshot.SRC_W, Screenshot.SRC_H, screen, Screenshot.OFFSET_X, 
    Screenshot.OFFSET_Y)
    return bmp
0reactions
kevinhughes27commented, Jun 3, 2017

the image api has changed around a few times. It used to be wx.Bitmap. I would look around at the docs and see what you find. I am using 3.0.3 on Linux mint so you could also just try to up the version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TensorKart - self-driving MarioKart with TensorFlow - GitHub
Recording Samples. Start your emulator program ( mupen64plus ) and run Mario Kart 64; Make sure you have a joystick connected and that...
Read more >
TensorKart: self-driving MarioKart with TensorFlow
The first thing I tried was to send input events using python-uinput. This almost worked and several joystick utilities believed my program was ......
Read more >
GameCompatibility - Mupen64Plus Wiki
Game name Works best with =) 40 Winks Glide64 =) 1080 Snowboarding Glide64 =) AeroGauge
Read more >
Open Source For You - March 2017 PDF - Scribd
developer has used the open source N64 emulator mupen64plus to play Mario Kart ... Hughes believes open source is the key to run...
Read more >
海遊旅人 遊行編|TensorFlow with Docker
DEV · Line Detection · Object Detection · TensorFlowを大幅アップデート · Deep Learning TensorFlow · Autopilot-TensorFlow · TensorKart · Python でデータサイエンス ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found