genicam / harvesters

Image Acquisition Library for GenICam-based Machine Vision System
Apache License 2.0
502 stars 86 forks source link

urlparse() leaves an extra slash at the beginning of the path on Windows #277

Closed k2arjun closed 2 years ago

k2arjun commented 2 years ago

Describe the bug The call to urlparse() in line 2338 of core.py returns with an extra '/' at the beginning of the string of its "path" member. This seems to have been addressed for the location == "local" case, but not for the location == "file" case. (#128)

Camera returns the following url: 'file:///C:/ProgramData/GenICam/xml/cache/Optronis_Cyclone_V1_7_8.xml'

urlparse().path = '/C:/ProgramData/GenICam/xml/cache/Optronis_Cyclone_V1_7_8.xml'

Expected Behavior The leading slashes should be stripped, like with the location == "local" case.

Screenshots image

Configuration

kazunarikudo commented 2 years ago

@k2arjun Hi, thank you for the report. I will fix that. Regards, Kazunari.