webcompat.com icon indicating copy to clipboard operation
webcompat.com copied to clipboard

Use of os.path.normcase causes fetching milestones to fail on Widnows

Open miketaylr opened this issue 3 years ago • 1 comments

https://github.com/webcompat/webcompat.com/blob/5714ca924f73fd3ead39cbe29d6f470bcaacd608/config/init.py#L48

Fetching milestones from Github…
It failed with 404 Client Error: Not Found for url: https://api.github.com/repos%5Cwebcompat%5Cwebcompat-tests%5Cmilestones!
We will read from data/milestones.json

Note that https://api.github.com/repos%5Cwebcompat%5Cwebcompat-tests%5Cmilestones is 404 - because %5c is \ and not /. Oops.

I think instead of os.path.normcase, we want to remove that - just os.path.join should work.

miketaylr avatar Feb 12 '22 00:02 miketaylr

In theory we fixed this in https://github.com/webcompat/webcompat.com/issues/2497, but I don't think we actually did. Oops. This is a URI - we don't want any platform-specific handling here.

miketaylr avatar Feb 12 '22 00:02 miketaylr