TabError: inconsistent use of tabs and spaces in indentation
iamumairayub opened this issue · comments
Umair Ayub commented
I get following error while I run pipreqs .
on Windows or Linux both.
Traceback (most recent call last):
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\Scripts\pipreqs.exe\__main__.py", line 7, in <module>
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\pipreqs\pipreqs.py", line 528, in main
init(args)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\pipreqs\pipreqs.py", line 455, in init
candidates = get_all_imports(input_path,
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\pipreqs\pipreqs.py", line 131, in get_all_imports
raise exc
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\site-packages\pipreqs\pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "C:\Users\User\AppData\Local\Programs\Python\Python39\lib\ast.py", line 51, in parse
return compile(source, filename, mode, flags, _feature_version=feature_version)
File "<unknown>", line 44
super(MyThread, self).__init__(group=group, target=target,
TabError: inconsistent use of tabs and spaces in indentation
Alan Barzilay commented
have you identified the file that raises this error? would it be possible to share it? I can' t replicate the error at the moment
Alan Barzilay commented
also, are you sure you are using a file with valid python code? this looks like a borked file, from the error message