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

Exception while running detector unused-import: KeyError(PosixPath(...)) #74

Open
zarifpour opened this issue Dec 28, 2023 · 1 comment

Comments

@zarifpour
Copy link

The detector keeps firing even when I used named imports, i.e:

import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";

Here is the full message:

[Error - 15:30:55] Exception while running detector unused-import: KeyError(PosixPath('/Users/daniel.zarifpour/**REDACTED**/node_modules/@openzeppelin/contracts/access/Ownable.sol'))
@michprev
Copy link
Member

michprev commented Jan 2, 2024

Hey @zarifpour, thank you for reporting this. While I know what code causes this error, I cannot think of circumstances when this would happen. A minimal reproducible example would certainly help.

Does your project contain any compilation errors? These would be reported in the Tools for Solidity tab in VS Code (the bottom Compiler window)
image

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

No branches or pull requests

2 participants