ianalis / scraper2022

2022electionresults.comelec.gov.ph scraper
MIT License
2 stars 6 forks source link

Possible Volume Label Syntax Error #2

Closed dtjunkie closed 2 years ago

dtjunkie commented 2 years ago

The program returned an error while attempting to retrieve data of election result from Brgy. Fuentes in Banate,Iloilo.

Error Description: OS Error: [WinError 123]: The filename, directory name, or volume label syntax is incorrect: 'data\results\REGION VI\ILOILO\BANATE\FUENTES*'

I think it has to do with the syntax of the name of the barangay.

Screenshot 2022-08-10 005956

dtjunkie commented 2 years ago

I've added a line of code (highlighted) that will remove the asterisk mark from the file path name. So far, the program is now working, but I'll continue to monitor as there might be other marks than the asterisk that might be included in the file path name.

Screenshot 2022-08-11 011733

ianalis commented 2 years ago

This is not an issue on *nix systems. I suggest that instead of removing the asterisk, replace it with something else instead (for example, the plus sign). I think the names are from the PSGC so it's better to make the transformation reversible to keep compatibility with it.

You may submit a PR after revising the code. Thanks!

dtjunkie commented 2 years ago

Hi Ian!

I've already submitted a PR for the revision. You can check it out for your approval. Thanks!