Lesson 11: FileNotFoundError: [Errno 2] No such file or directory: './metadata/rinkeby/0-PUG.json' #241
-
Hi, On rinkeby, I've run deploy_and_create.py, create_collectible.py and waited for the tokenCounter = 2, then ran create_metadata.py and get the following error where it can't find the image. PS C:\Users\chris\Dropbox\00_CODE\NFT-DEMO> brownie run scripts/advanced_collectible/create_metadata.py --network rinkeby NftDemoProject is the active project. Running 'scripts\advanced_collectible\create_metadata.py::main'... Below are the outputs from deploy_and _create.py, create_collectible.py and create_metadata.py. PS C:\Users\chris\Dropbox\00_CODE\NFT-DEMO> brownie run scripts/advanced_collectible/deploy_and_create.py --network rinkeby NftDemoProject is the active project. Running 'scripts\advanced_collectible\deploy_and_create.py::main'... Waiting for https://api-rinkeby.etherscan.io/api to process contract... LinkToken.transfer confirmed Block: 9505482 Gas used: 51811 (90.91%) Funded 0x846A06e5716517Db40F02398173C8a1D79AE186B AdvancedCollectible.createCollectible confirmed Block: 9505483 Gas used: 173611 (90.91%) New token has been created! NftDemoProject is the active project. Running 'scripts\advanced_collectible\create_collectible.py::main'... LinkToken.transfer confirmed Block: 9505513 Gas used: 34711 (90.91%) Funded 0x846A06e5716517Db40F02398173C8a1D79AE186B Collectible created! NftDemoProject is the active project. Running 'scripts\advanced_collectible\create_metadata.py::main'... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Please post your create_metadata.py code here. |
Beta Was this translation helpful? Give feedback.
-
it seems that everything is ok, however I wonder did you update the |
Beta Was this translation helpful? Give feedback.
it seems that everything is ok, however I wonder did you update the
.env
file and exported UPLOAD_IPFS, remember even you add it to .env sometimes you should export it manually in order to work.Finally this is not important but i strongly suggest yo change this line:
image_uri = f"https://ipfs.io/ipfs/{ipfs_hash}?filename={filename}"
for this:
image_uri = "https://ipfs.io/ipfs/{}?filename={}".format(ipfs_hash, filename)