Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
KeyError on initialising YoutubeDL in python3 #3910
Comments
KeyError on initialising YoutubeDL in python3 #3910
Hello,
When instantiating a
YoutubeDLon python3 without having the locale properly set, I get aKeyError, due to params not havingrestrictfilenamesset. I can simulate it by setting LC_ALL to 'ascii'.The area of code where it occurs is the following:
in particular, the line reading
and not params['restrictfilenames']):Given that the result of this if statement is to set, the
restrictfilenamesattribute of the object toTrue, does it matter what the existing value ofparamsis? My proposed solution is to just remove that part of the if statement. The only potential difference I can see to the existing behaviour is that it would emit a warning even ifparams['restrictfilenames']were explicitly set toTrue. I will submit this as a pull request. Please let me know if you see any problem with this, or if you need more information.Thanks,
George