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

example capture loop not working, cant trace back how it is supposed to, .so not loaded on debian (raspberry) #13

Open
noblockhit opened this issue Mar 13, 2023 · 3 comments

Comments

@noblockhit
Copy link

I have a BMS11000A and i want to retreive an image, but the example code does not work. I assume the function get_frame is supposed to be called in camera.py at line 118, but i cant trace back a single call. Im on windows 11 atm, im running it on python 3.10.1 on 64bit, and i have adjusted the code to py3 as far as i know. But ultimatly, i want to run it on a raspberry, where the .so file cannot be loaded, I assume.

On win11 i get this error:

Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy\__main__.py", line 39, in <module>
    cli.main()
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 430, in main
    run()
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "c:\Users\bubig\.vscode\extensions\ms-python.python-2023.4.0\pythonFiles\lib\python\debugpy\_vendored\pydevd\_pydevd_bundle\pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "D:\temp\toupcam-master\toupcam-master\examples\capture_loop.py", line 49, in <module>
    main()
  File "D:\temp\toupcam-master\toupcam-master\examples\capture_loop.py", line 44, in main
    cam.save(path)
  File "D:\temp\toupcam-master\toupcam-master\camera.py", line 55, in save
    image = self.get_pil_image()
  File "D:\temp\toupcam-master\toupcam-master\camera.py", line 82, in get_pil_image
    raw = data.view(uint8).reshape(data.shape + (-1,))
AttributeError: 'NoneType' object has no attribute 'view'
@jirhiker
Copy link
Member

Its likely that ToupCamCamera.open failed to execute properly. This will happen if it fails to get the image size from the camera e.g. get_size, which typically indicates its not talking to the camera at all

@noblockhit
Copy link
Author

Wow, thanks for the quick response! I realised that already, to further debug the problem I downloaded ToupView, but it cant find a camera either, but windows recognises at least a USB3 device:
image
So, if you have an Idea what the issue could be, I'd be happy to know, either way I have contacted the support regarding both issues!

@noblockhit
Copy link
Author

Update: I managed to make WIN11 recognize the camera using BMS pix, and i am getting a proper output. Do you have an idea what the problem could be?

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

2 participants