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
I am getting a ValueError when stopping my application after unregistering a service provided by a ServiceOffer in another plugin.
After some digging, it looks like the CorePlugin._service_ids contains a list of service IDs that were provided to the 'envisage.service_offers' extension point. Then when the plugin stops, it attempts to unregister those services. However, if one of those services was unregistered with Application.unregister_service(<id>), the id is not also removed from CorePlugin._service_ids and stopping the plugin results in the following:
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/application.py", line 338, in stop
self.plugin_manager.stop()
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/composite_plugin_manager.py", line 167, in stop
self.stop_plugin(plugin)
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/composite_plugin_manager.py", line 177, in stop_plugin
plugin.activator.stop_plugin(plugin)
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/plugin_activator.py", line 49, in stop_plugin
plugin.unregister_services()
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/plugin.py", line 285, in unregister_services
for service_id in service_ids:
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/application.py", line 422, in unregister_service
self.service_registry.unregister_service(service_id)
File "/Users/jcorson/.edm/envs/foo/lib/python3.6/site-packages/envisage/service_registry.py", line 191, in unregister_service
raise ValueError('no service with id <%d>' % service_id)
ValueError: no service with id <13>
The text was updated successfully, but these errors were encountered:
I am getting a
ValueError
when stopping my application after unregistering a service provided by aServiceOffer
in another plugin.After some digging, it looks like the
CorePlugin._service_ids
contains a list of service IDs that were provided to the'envisage.service_offers'
extension point. Then when the plugin stops, it attempts to unregister those services. However, if one of those services was unregistered withApplication.unregister_service(<id>)
, the id is not also removed fromCorePlugin._service_ids
and stopping the plugin results in the following:The text was updated successfully, but these errors were encountered: