Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python 3.8 - pygame 1.9.6 - camera.init() - SystemError: bad call flags #1570

Closed
kiwi-x opened this issue Jan 30, 2020 · 7 comments
Closed

Comments

@kiwi-x
Copy link

kiwi-x commented Jan 30, 2020

Hello,

I'm running Manjaro (Arch) and when I try to initialize the camera object it breaks:

 % python
Python 3.8.1 (default, Jan  8 2020, 23:09:20) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
>>> import pygame.camera
>>> 
>>> pygame.init()
(6, 0)
>>> pygame.camera.init()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pygame/camera.py", line 44, in init
    from pygame import _camera
SystemError: bad call flags
>>> 

I tried it on different systems (manjaro current and testing) with different cameras (two notebooks with internal cameras and a desktop pc with attached usb camera). I tried different pygame versions (down to 1.9.4) which is the current one on my raspberry pi. But my pi uses python 3.7, I think..

Many thanks
kiwi-x

@snowsignal
Copy link

I have the exact same issue.

@kiwi-x
Copy link
Author

kiwi-x commented Feb 10, 2020

I just read that python 3.8 support will come with pygame 2. So I just tried it against pygame 2.0 dev 6 but there is the same issue:

~ % python
Python 3.8.1 (default, Jan 22 2020, 06:38:00) 
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
pygame 2.0.0.dev6 (SDL 2.0.10, python 3.8.1)
Hello from the pygame community. https://www.pygame.org/contribute.html
>>> import pygame.camera
>>> pygame.camera.init()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/site-packages/pygame/camera.py", line 44, in init
    from pygame import _camera
SystemError: bad call flags
>>> 

Regards
kiwi-x

@flaambe
Copy link
Contributor

flaambe commented Feb 16, 2020

@kiwi-x I think this issue was fixed by PR #1484. Just tested current master branch dev7, no error

>>> import pygame
pygame 2.0.0.dev7 (SDL 2.0.10, python 3.8.2)
Hello from the pygame community. https://www.pygame.org/contribute.html
>>> import pygame.camera
>>> pygame.camera.init()
>>> 

@vguttmann
Copy link

@kiwi-x @flaambe Still have the issue, at least if I just run

pip install pygame

@kiwi-x
Copy link
Author

kiwi-x commented Apr 13, 2020

@vguttmann I think we have to wait for the next release (2.0.0.dev7 or later)

@MyreMylar
Copy link
Contributor

If any of you are on windows, you might also want to make sure you have the VideoCapture library.

Available here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#videocapture

Last I checked the camera module won't work without it on windows.

@kiwi-x
Copy link
Author

kiwi-x commented May 8, 2020

With pygame 2.0.0.dev8 - this issues is solved - Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants