You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
In the early versions before or equal to 0.2.6, Harvester and ImageAcquirer objects executed their finalization procedures on the __del__ method call but it brought us an inconsistency: For example, when a __del__ method is called the program is being shut down and some Python objects including built-in methods such as open have already been destructed. It means our __del__ method might not work due to the objects that have been destructed during the shutdown process. Actually, we can get the following exception when we try to log using the file handler:
NameError: name 'open' is not defined
Describe the solution you'd like
There could be a better solution but enforce users to explicitly call ImageAcquirer.descruct or Harvester.reset method. However, Harvester should keep the __enter__ and the __exit__ methods so that people can rely on the with method.
Describe alternatives you've considered
None.
Additional context
None.
The text was updated successfully, but these errors were encountered:
This issue has been finally resolved by #73 and it's not necessary to manually call the finalization methods such as destroy or reset anymore. Even if a user forgot to call those methods, Harvester and ImageAcquirer objects can finalize themselves.
Is your feature request related to a problem? Please describe.
In the early versions before or equal to
0.2.6
,Harvester
andImageAcquirer
objects executed their finalization procedures on the__del__
method call but it brought us an inconsistency: For example, when a__del__
method is called the program is being shut down and some Python objects including built-in methods such asopen
have already been destructed. It means our__del__
method might not work due to the objects that have been destructed during the shutdown process. Actually, we can get the following exception when we try to log using the file handler:NameError: name 'open' is not defined
Describe the solution you'd like
There could be a better solution but enforce users to explicitly call
ImageAcquirer.descruct
orHarvester.reset
method. However, Harvester should keep the__enter__
and the__exit__
methods so that people can rely on thewith
method.Describe alternatives you've considered
None.
Additional context
None.
The text was updated successfully, but these errors were encountered: