-
Notifications
You must be signed in to change notification settings - Fork 91
FAQ
My program involves 2 or more network interface cards, NICs in short. However, everything is fine as long as I use only a single NIC but my program turns corrpted once I started to use 2 or more network interface cards. Why is this issue happening?
Assign individual subnet to each NIC. They should not reside in the same subnet.
Microsoft: How multiple adapters on the same network are expected to behave
I'm using Harvester and would like to know its version number.
You can check the version number referring to the __version__ property. The code would like like as follows:
import harvesters
print(harvesters.__version__)
I'm just creating ImageAcquirer objects passing a factory method a Harvester object:
class Foo:
def create_image_acquirer(harvester: Harvester, index: int):
return harvester.create_image_acquirer(id_=index)
However, Harvester unexpectedly raises ClosedException. Why?
Exception ignored in: <function ImageAcquirer.__del__ at 0x0000019F2A2E8C80>
Traceback (most recent call last):
File "C:\Python37\lib\site-packages\harvesters\core.py", line 1383, in __del__
self.destroy()
File "C:\Python37\lib\site-packages\harvesters\core.py", line 1968, in destroy
self._parent._destroy_image_acquirer(self)
File "C:\Python37\lib\site-packages\harvesters\core.py", line 2489, in _destroy_image_acquirer
id_ = ia._device.id_
File "C:\Python37\lib\site-packages\genicam2\gentl.py", line 3238, in _get_id_
return _gentl.Device__get_id_(self)
_gentl.ClosedException: GenTL exception: Tried to call a function but the library has been closed. Call GCInitLib first. (ID: -10002)
A possible short answer is you don't hold the Harvester object while the created ImageAcquirer objects.
Nothing wrong with creating ImageAcquirer objects calling a factory method but if the Foo object reaches out to its life although the ImageAcquirer objects will keep existing, the C++ objects of each Python ImageAcquirer object will be automatically destructed by design.
Having that destruction, the ImageAcquirer objects turn dangling and any operation on the objects lose meaning because it's C++ object has gone.
Again, please keep holding the Harvester object as long as you keep holding ImageAcquirer objects.
How can I upgrade Harvester to an arbitrary version using pip
?
You can upgrade/downgrade Harvester just typing as follows; if you want to upgrade to 0.2.0
then:
$ pip install harvesters==0.2.0
It's not always but sometimes I need to check the dependenies of the Python packages that I installed using pip
. Is there any way to easily make it?
Maybe pipdeptree could help you. You can install pipdeptree
typing the following command:
$ pip install pipdeptree
After installed that, type the following command:
$ pipdeptree
It will dispay the dependency tree.
Following the "Getting started" page, I copied a CTI file to my location and actually pointed out the location where my target CTI files are located as follows:
h = Harvester()
h.add_cti_file('my_target.cti')
h.update_device_info_list()
_gentl.LoadLibraryException: GenTL exception: Failed to load CTI file; The specified module could not be found. (ID: -10001)
A CTI file is a shared library actually. So PLEASE DO NOT USE THE COPIED CTI FILE!! PLEASE!! Library manufacturers provide you CTI files in appropriate locations because the libraries may need to retrieve relevant libraries to link. If you use the copied one, it may be located in an incorrect location where the library can't load other relevant libraries.
Following the "Getting started" page, I actually pointed out the location where my target CTI files are located as follows:
h = Harvester()
h.add_cti_file('c:\path\to\my_target.cti')
h.update_device_info_list()
_gentl.LoadLibraryException: GenTL exception: Failed to load CTI file; The specified module could not be found. (ID: -10001)
If you want to describe a file path using the Windows style directory separator, you will have to use \\
instead of \
. I mean you had to code as follows:
h = Harvester()
h.add_cti_file('c:\\path\\to\\my_target.cti')
Or, the UNIX style is also a way to go:
h.add_cti_file('c:/path/to/my_target.cti')
Following the "Getting started" page, I actually pointed out the location where my target CTI files are located as follows:
h = Harvester()
h.add_cti_file('/path/to/my_target.cti')
h.update_device_info_list()
However, Harvester raises the following exception.
_gentl.LoadLibraryException: GenTL exception: Failed to load CTI file; /home/server/Desktop/ctifiles/GxGVTL.cti: invalid ELF header (ID: -10001)
Are you sure the CTI file was generated for your target operating system? In general, CTI files are system dependent and usually don't work on other operating systems; so the Windows version works only on Windows and the others as well. Actually, CTI files are shared objects or DLLs that renamed the file extension to cti
. Please make sure if the CTI file is generated for your target operatingsystem.
Any image in .rst files is not correctly displayed on my web browser while I'm trying it at my office. However, they are actually displayed if I browse them on my private laptop. What is the difference?
Perhaps your company's Proxy server could be blocking you to access the resources in GitHub domain. In this case, you should browse the .rst
file locally.
First, you should clone out repository:
Then install a restructured text file browser called restview
:
$ pip install restview
Finally, open the README.rst in your working copy from it:
$ restview README.rst
restview
will open your default web browser and show the contents of the .rst
file. In the displayed contents the images in the .rst
file should be correctly displayed.