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

Exception occur when create camera. GenTL exception: Requested operation is not allowed. (ID: -1005) #443

Open
2 of 4 tasks
Yasirsmb opened this issue Feb 7, 2024 · 1 comment

Comments

@Yasirsmb
Copy link

Yasirsmb commented Feb 7, 2024

Describe the Issue
I have simple program it detect camera but at h.create()/h.create(0) its gives exception

Sample Code
I can show a piece of code that demonstrates the reported phenomenon:

  • [ x] Yes
  • No
  • (Please select either yes or no.)

Here is the code its just test code so see it if create:

from harvesters.core import Harvester
import numpy as np

if __name__ == "__main__":
    h = Harvester()
    h.reset()
    h.add_file('/opt/ImpactAcquire/lib/x86_64/mvGenTLProducer.cti')
    h.update()
    device_info_list = h.device_info_list
    print(device_info_list)
    ia = h.create()
    print("done")

This is the exception i am getting:

Cannot check if IP address available: 'arping' not found
Cannot check if IP address available: 'arping' not found
[{'access_status': 3, 'display_name': 'MATRIX VISION GmbH mvBlueCOUGAR-X120aC-POE(00:0c:8d:60:1e:b4)', 'id_': 'mvBlueCOUGAR-X120aC-POE(00:0c:8d:60:1e:b4)', 'model': 'mvBlueCOUGAR-X120aC-POE', 'parent': <genicam.gentl.Interface; proxy of <Swig Object of type 'std::shared_ptr< GenTLCpp::TLInterface > *' at 0x7feb9814b570> >, 'serial_number': 'GX007860', 'tl_type': 'GEV', 'user_defined_name': '', 'vendor': 'MATRIX VISION GmbH', 'version': '1.03'}]
Traceback (most recent call last):
  File "/home/yasir/source/cameralib/test2.py", line 11, in <module>
    ia = h.create()
  File "/home/yasir/.local/lib/python3.10/site-packages/harvesters/core.py", line 3082, in create
    return self._create_acquirer(device_proxy=device_proxy, config=config)
  File "/home/yasir/.local/lib/python3.10/site-packages/harvesters/core.py", line 3099, in _create_acquirer
    device_proxy.open(_privilege)
  File "/home/yasir/.local/lib/python3.10/site-packages/harvesters/core.py", line 228, in m
    return getattr(self._source_object, attribute)(*args)
  File "/home/yasir/.local/lib/python3.10/site-packages/genicam/gentl.py", line 3189, in open
    return _gentl.Device_open(self, accessFlags)
_gentl.AccessDeniedException: GenTL exception: Requested operation is not allowed. (Message from the source: ) (ID: -1005)

Expected Behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem; Note that it is not necessary to put everything as a screenshot! If the source is a text just paste the text because that is much helpful for us.

Configuration

  • OS: [e.g. macOS 10.14]
  • Python: [e.g. 3.7]
  • Harvester: [e.g. 1.2.12]
  • GenTL Producer: [e.g. Muffle Donut API version 12.1, Itchy Inc.]
  • Camera: [e.g. Gong Hyperspectral, Scratchy AG]

Reproducibility

This phenomenon can be stably reproduced:

  • [ x] Yes
  • No.
  • (Please select either yes or no.)

If applicable, please provide your observation about the reproducibility.

Actions You Have Taken

I have been working in windows with same GenTL and its working fine there a and capturing image. When i came to linux I install same GenTL and try to get initiallize image it always stuck at h.create()

Additional context
Add any other context about the problem here.

@kmdouglass
Copy link

Hi @Yasirsmb ,

I just ran into the exact same issue. In my case, the GenICam software that came with my frame grabber was still open and connected to the camera, which prevented the Python script from connecting to the camera. Maybe you could verify that no other software is connected to the camera.

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