Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipreqs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__author__ = 'Vadim Kravcenko'
__email__ = 'vadim.kravcenko@gmail.com'
__version__ = '0.4.11'
__version__ = '0.4.12'
4 changes: 2 additions & 2 deletions pipreqs/pipreqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def get_all_imports(
candidates += [os.path.splitext(fn)[0] for fn in files]
for file_name in files:
file_name = os.path.join(root, file_name)
with open(file_name, "r", encoding=encoding) as f:
with open(file_name, "r", encoding=encoding, errors="ignore") as f:
contents = f.read()
try:
tree = ast.parse(contents)
Expand Down Expand Up @@ -202,7 +202,7 @@ def get_locally_installed_packages(encoding=None):
for item in files:
if "top_level" in item:
item = os.path.join(root, item)
with open(item, "r", encoding=encoding) as f:
with open(item, "r", encoding=encoding, errors="ignore") as f:
package = root.split(os.sep)[-1].split("-")
try:
package_import = f.read().strip().split("\n")
Expand Down