Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File does not exist #358

Closed
NoroMeb opened this issue Jan 11, 2023 · 2 comments
Closed

File does not exist #358

NoroMeb opened this issue Jan 11, 2023 · 2 comments

Comments

@NoroMeb
Copy link

NoroMeb commented Jan 11, 2023

Getting this error when running slither . :

Traceback (most recent call last):
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 834, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 98, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 76, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\slither.py", line 112, in __init__
    parser.parse_top_level_from_loaded_json(ast, path)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\solc_parsing\slither_compilation_unit_solc.py", line 281, in parse_top_level_from_loaded_json
    get_imported_scope = self.compilation_unit.get_scope(import_directive.filename)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\core\compilation_unit.py", line 237, in get_scope
    filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup(
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\crytic_compile\crytic_compile.py", line 182, in filename_lookup
    raise ValueError(f"{filename} does not exist")
ValueError: interfaces/IXToken.sol does not exist
Error in .
Traceback (most recent call last):
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 834, in main_impl
    ) = process_all(filename, args, detector_classes, printer_classes)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 98, in process_all
    ) = process_single(compilation, args, detector_classes, printer_classes)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\__main__.py", line 76, in process_single
    slither = Slither(target, ast_format=ast, **vars(args))
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\slither.py", line 112, in __init__
    parser.parse_top_level_from_loaded_json(ast, path)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\solc_parsing\slither_compilation_unit_solc.py", line 281, in parse_top_level_from_loaded_json
    get_imported_scope = self.compilation_unit.get_scope(import_directive.filename)
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\slither\core\compilation_unit.py", line 237, in get_scope
    filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup(
  File "C:\Users\Dell\AppData\Local\Programs\Python\Python310\lib\site-packages\crytic_compile\crytic_compile.py", line 182, in filename_lookup
    raise ValueError(f"{filename} does not exist")
ValueError: interfaces/IXToken.sol does not exist

But the file path is correct . Here is the repo i ran the slither .
commande in, you can verify that interfaces/IXToken.sol exists .

@elopez elopez transferred this issue from crytic/slither Jan 11, 2023
elopez added a commit that referenced this issue Jan 11, 2023
@elopez
Copy link
Member

elopez commented Jan 11, 2023

Thanks for the report @NoroMeb! I have transferred this issue to the crytic-compile repo -- It looks like crytic-compile is not parsing artifacts for interfaces when using brownie. After reviewing other issues, it seems this is due to a limitation in brownie, you can see #267 and eth-brownie/brownie#941

@NoroMeb
Copy link
Author

NoroMeb commented Jan 11, 2023

Okay i see, i hope that the team behind brownie will fix this asap

@NoroMeb NoroMeb closed this as completed Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants