View: 364|Reply: 3

Cannot load GUI PiCar A

[Copy link]

1

Threads

2

Posts

11

Credits

Newbie

Rank: 1

Credits
11
Post time 2019-7-7 03:54:27 | Show all posts |Read mode
Hi we have built the Pi Car A, and when we try to start the GUI using client.py we get the following error message :

Traceback (most recent call last):
  File "C:\Users\Andy\client\client.py", line 652, in <module>
    loop()                   # Load GUI
  File "C:\Users\Andy\client\client.py", line 239, in loop
    logo =tk.PhotoImage(file = 'logo.png')         #Define the picture of logo,but only supports '.png' and '.gif'
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 3366, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 3320, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "logo.png"

Please help ????
Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-7-8 10:04:20 | Show all posts
Open the file client.py with Notepad or other IDE, manually comment line 239, 240 and 241 (input # ahead of the line to comment out).

TIM图片20190708100418.png
Reply

Use magic Report

1

Threads

2

Posts

11

Credits

Newbie

Rank: 1

Credits
11
 Author| Post time 2019-7-9 10:47:31 | Show all posts
That has got the GUI and the video to work, so thankyou. The problem now is the motors run in the wrong direction. I have tried putting a negative valve into the GUI pressing the Motor A button above it and then restarting the server on the car. But the values don't change and the motor still runs backwards.

How do I upload new parameters to the car ?
Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-7-11 10:03:09 | Show all posts
1562442703 replied at 2019-7-9 10:47 AM
That has got the GUI and the video to work, so thankyou. The problem now is the motors run in the wr ...

Please refer to https://www.youtube.com/watch?v=6pDXbeA5pVA
Based on the same principle, try to solve the problem of the motors.
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules