View: 1535|Reply: 6

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

0

Threads

5

Posts

12

Credits

Newbie

Rank: 1

Credits
12
Post time 2021-6-17 14:22:01 | Show all posts
Hello mate, same with my PiCar, I had previously bought a raspberry pi based car before, while it took some effort assembling that product, it functioned as expected. I bought picar-4wd expecting an easier installation, however when I received the product first it had a part broken and missing, I returned the product and was promptly provided a replacement. I Cannot load GUI, there's also an error appearing. Anyways, I hope you could help us with this matter, has anyone here have tried download game multiplayer football games? I can't download it, maybe there's something wrong with my internet.
Reply

Use magic Report

0

Threads

2

Posts

6

Credits

Newbie

Rank: 1

Credits
6
Post time 2024-4-15 16:58:58 | Show all posts
Implement error handling in the client.py script to catch and display more informative error messages when encountering issues with loading the image file. This can help identify the specific cause of the problem and provide guidance on how to resolve it. mapquest
Reply

Use magic Report

0

Threads

2

Posts

10

Credits

Newbie

Rank: 1

Credits
10
Post time 2024-6-5 11:25:16 | Show all posts
I think this post is very helpful and full of useful information. So, I'd like to thank you for all the hard work you put into writing this article fnaf
Reply

Use magic Report

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

Points Rules