Skip to content
This repository has been archived by the owner on Aug 8, 2024. It is now read-only.

Could not import ERC165 #14

Open
acche opened this issue Aug 18, 2022 · 3 comments
Open

Could not import ERC165 #14

acche opened this issue Aug 18, 2022 · 3 comments

Comments

@acche
Copy link

acche commented Aug 18, 2022

contracts/ERC721_ex1.cairo:10:6: Could not find module 'openzeppelin.introspection.ERC165'. Searched in the following paths:
/Users/x/Dev/web3park/cairo/starknet-erc721-workshop/openzeppelin/introspection/ERC165.cairo
/Users/x/Dev/web3park/cairo/cairo_venv/lib/python3.8/site-packages/openzeppelin/introspection/ERC165.cairo
from openzeppelin.introspection.ERC165 import ERC165
     ^*******************************^

Compiled with error, please help.

@acche
Copy link
Author

acche commented Aug 18, 2022

Maybe need to change :

from openzeppelin.introspection.ERC165 import ERC165

to:

from openzeppelin.introspection.erc165.library import ERC165

@panda4us
Copy link

There is also another similar issue:
openzeppelin.access.ownable -> openzeppelin.access.ownable.library

@BIZZLETONC
Copy link

It looks like you are trying to import the ERC165 module from the openzeppelin.introspection package, but it is not being found. This error message indicates that the Cairo compiler looked for the ERC165 module in the directories /Users/x/Dev/web3park/cairo/starknet-erc721-workshop/openzeppelin/introspection/ and /Users/x/Dev/web3park/cairo/cairo_venv/lib/python3.8/site-packages/openzeppelin/introspection/, but it was not found in either directory.

Make sure that the openzeppelin.introspection package is installed and that the ERC165 module is located in one of the specified directories. If the package is not installed, you can install it using the pip package manager:

pip install openzeppelin

If you have already installed the package, make sure that the package is properly installed and that the ERC165 module is located in one of the directories that the Cairo compiler searched (i.e., /Users/x/Dev/web3park/cairo/starknet-erc721-workshop/openzeppelin/introspection/ and /Users/x/Dev/web3park/cairo/cairo_venv/lib/python3.8/site-packages/openzeppelin/introspection/).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants