Environment
- deptry version: 0.24.0
- Python version: 3.13.2
- Operating system: Windows 11
Describe the issue
When a requirements.txt file has a UTF-16 encoding, deptry is not able to parse the file, though pip can still use it.
packaging.requirements.InvalidRequirement: Expected package name at the start of dependency specifier
ÿþdeptry
Notice the BOM characters appearing in the traceback.
Minimal way to reproduce the issue
Create a requirements.txt file, put deptry in it, and give it a UTF-16 encoding. I made my test file in VS Code using the encoding menu.
Expected behavior
Deptry is able to parse the file and evaluate the dependencies.