question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enumeration of camera - issue with multiple instances of the same camera!

See original GitHub issue

I am trying to use the USB 3.0 1280-54um camera through pypylon on my Mac OX 10.15 (Catalina). This error has nothing to do with the Mac OSx latest update from 10.14 (Mojave) to 10.15 as the error was pre-existing in the 10.14 revision.

Based on the examples for camera access and functioning provided in the python code examples, I am doing the following in my __main__:

self.tlFactory = pylon.TlFactory.GetInstance() # instantiate an object self.devList = self.tlFactory.EnumerateDevices() # enumerate devices

At this point, although there is only one Basler camera 1280-54um connected to the USB port, the devList object is assigned a list of two devices both containing the same serial number.

A snapshot of the content within devList as obtained from Visual Code Editor is: 0:<pypylon.pylon.DeviceInfo; proxy of <Swig Object of type ‘Pylon::CDeviceInfo *’ at 0x118614f30> > 1:<pypylon.pylon.DeviceInfo; proxy of <Swig Object of type ‘Pylon::CDeviceInfo *’ at 0x118614ea0> > len:2

@basler-oss, could you please provide a resolution for the same at the earliest?

I am trying to make my app work on python and at the transport layer somehow two instances of the same device get created within the EnumerateDevices() function.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:10

github_iconTop GitHub Comments

2reactions
thiesmoellercommented, Oct 16, 2019

if you print out the device-info [ e.g. model and serial number ] of the two devices you see: are they really the same? As a quick workaround the method CreateFirstDevice() on TlFactory will pick the first on any list

1reaction
thiesmoellercommented, May 17, 2021

the copying of the files into the wheel has an issue of accidentally resolving symbolic links. pylon tries to enumerate all transport layers and will find the same library under two names .

mac@macs-MacBook-Pro ~ % sudo dtrace -n 'pid$target:libdyld:dlopen:entry { printf("dlopen: %s\n", copyinstr(arg0));}  ' -c "/Users/mac/.pyenv/versions/3.7.9/bin/python3 test.py"
dtrace: system integrity protection is on, some features will not be available

dtrace: description 'pid$target:libdyld:dlopen:entry ' matched 1 probe
BaslerUsb N/A USB/BaslerUsb 6.1.2.18349
BaslerGigE N/A GigE/BaslerGigE 6.1.2.18349
BaslerGigE N/A GigE/BaslerGigE 6.1.2.18349
dtrace: pid 5883 has exited
CPU     ID                    FUNCTION:NAME
  1   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/_pylon.cpython-37m-darwin.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/liblog4cpp_gcc_v3_1_Basler_pylon.dylib

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/_genicam.cpython-37m-darwin.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/lib-dynload/_heapq.cpython-37m-darwin.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_camemu-6.1.2.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_camemu.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_gige-6.1.2.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_gige.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_gtc-6.1.2.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_gtc.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/libpylon_TL_usb-6.1.2.so

  3   2358                     dlopen:entry dlopen: /Users/mac/.pyenv/versions/3.7.9/lib/python3.7/site-packages/pypylon/pylon.framework/Versions/A/Libraries/pylon-libusb-1.0.dylib

Read more comments on GitHub >

github_iconTop Results From Across the Web

Identical webcam does not show up in Enumeration ... - MSDN
For that, I have created a new Visual Studio project and copied the code of the 'Selecting a Capture Device' example into it....
Read more >
c# - Multiple instances (CaptureElements) of the same camera ...
I am creating an UWP/WinRT app where you can record e.g. a presentation or some operations on your screen, draw on it and...
Read more >
Camera Enumeration on Android - Medium
The reason is that starting in Android P, we expect to see more devices with multiple cameras facing the same way, or even...
Read more >
Stability issues with mulitple camera setup
Problems with all cameras in a multiple setup being detected by enumeration have been reported by other users, so it is probably not...
Read more >
Camera lenses and capabilities | Android Developers
Many devices have multiple cameras that face the same direction. Some even have external USB cameras. To provide users with a UI that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found