Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Python issue in builtin? #105

Closed
eqsone opened this issue May 4, 2014 · 10 comments
Closed

Python issue in builtin? #105

eqsone opened this issue May 4, 2014 · 10 comments

Comments

@eqsone
Copy link

eqsone commented May 4, 2014

This python script on http://www.gtkdb.de/index_36_2229.html used to run a clock on the sainsmart18 with Kernel version 3.6.11+.
With the latest builtin image (version 3.10.33+) I get the following error message:

Traceback (most recent call last):
File "./clock.py", line 49, in
main()
File "./clock.py", line 38, in main
pygame.mouse.set_visible(0)
pygame.error: video system not initialized

Any idea on this one?

@notro
Copy link
Owner

notro commented May 4, 2014

Try running it as root: sudo ./clock.py

@eqsone
Copy link
Author

eqsone commented May 4, 2014

Thanx for your reply. Sorry, forgot to mention that I run it as root. Unfortunately this doesn't fix it.

@notro
Copy link
Owner

notro commented May 4, 2014

Strange. When I run it as root it's fine, but when I run it as a regular user I get the same error you get.
Does it work without that set_visible() call?

@eqsone
Copy link
Author

eqsone commented May 5, 2014

Now that's weird. So this seems to be a rights issue somehow? Found some guys in a german forum who also experience the same error, that's how I got to the hint on Kernel Version on which it seems to be running.
When I tried to put up a clean 2013-02-09 Wheezy with 3.6.11+ yesterday, my Made-in-China Pi failed to boot, obviously as it has a Micron chip (Red LED= steady, Green LED= 1x). So I'm stuck on newer firmware.
When I get home later I will test and reply on what happens without set_visible() call.
Thanx for your effort.

@cronicx
Copy link

cronicx commented May 5, 2014

Same error here.
Kernel 3.10.34+ (builtin image).
FIB,mplayer,X are running fine, except pygame.

Run as root. I tried clock.py the test.py (notros example of the wiki) and some self written skripts. I got the same error in every skript.
pygame.error: video system not initialized
I tried pygame.display.list_modes in inline editor. There are no modes avaible, replys the error above.

greets, cronic

@eqsone
Copy link
Author

eqsone commented May 5, 2014

Here's what I get without set.visible() call:

Traceback (most recent call last):
File "./clock.py", line 48, in
main()
File "./clock.py", line 38, in main
screen = pygame.display.set_mode(size)
pygame.error: Unable to open mouse

@notro
Copy link
Owner

notro commented May 5, 2014

It took me some time to understand this, as I had a touchscreen connected.
Try this:

unset SDL_MOUSEDRV
unset SDL_MOUSEDEV

If that works, remove them from /etc/profile.d/sdl.sh

@cronicx
Copy link

cronicx commented May 5, 2014

problem solved. thats it. thank you :)

@eqsone
Copy link
Author

eqsone commented May 5, 2014

Works indeed. Thank you so much :)

notro added a commit to notro/fbtft-spindle that referenced this issue Jul 24, 2014
Only add SDL_MOUSEDEV and SDL_MOUSEDRV when touchcontroller is present.
Fixes: notro/fbtft#105
@notro
Copy link
Owner

notro commented Aug 9, 2014

This is fixed in the latest image

@notro notro closed this as completed Aug 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants