I'm trying to complete the simple collectible NFT tutorial from this freeCodeCamp video. (I'm getting stuck on the script that starts exactly where the link is timestamped to.)
For those that can't open the video, I'm trying to run this brownie command:
brownie run scripts/deploy_and_create.py --network rinkeby
and I'm getting the following error:
dsine@DESKTOP-T74SG6U:/mnt/c/Users/dylan/projects/demos/nft-demo$ brownie run scripts/deploy_and_create.py --network rinkeby
Brownie v1.17.1 - Python development framework for Ethereum
NftDemoProject is the active project.
File "brownie/_cli/run.py", line 50, in main
return_value, frame = run(
File "brownie/project/scripts.py", line 53, in run
module = _import_from_path(script)
File "brownie/project/scripts.py", line 149, in _import_from_path
_import_cache[import_str] = importlib.import_module(import_str)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
File "<frozen, line line, in in
ModuleNotFoundError: No module named 'mnt.c.Users.dylan.projects'
I'm running this from the WSL Ubuntu terminal inside VSCode. I've tried running the script in powershell too. I've ensured I'm using Python 3 and WSL 2. I'm unsure of what is happening here.
Here is my deploy_and_create.py code:
from scripts.helpful_scripts import get_account
from brownie import SimpleCollectible
sample_token_uri = "https://ipfs.io/ipfs/Qmd9MCGtdVz2miNumBHDbvj8bigSgTwnr4SbyH6DNnpWdt?filename=0-PUG.json"
OPENSEA_URL = "https://testnets.opensea.io/assets/{}/{}"
def main():
account = get_account()
simple_collectible = SimpleCollectible.deploy({"from":account})
tx = simple_collectible.createCollectible(sample_token_uri, {"from": account})
tx.wait(1)
print(f"Awesome, you can view your NFT at {OPENSEA_URL.format(simple_collectible.address, simple_collectible.tokenCounter() - 1)}")
print("Please wait up to 20 minutes and hit the refresh metadata button.")
and my brownie-config.yaml:
dependencies:
- OpenZeppelin/openzeppelin-contracts@3.4.0
compiler:
solc:
remappings:
- '@openzeppelin=OpenZeppelin/openzeppelin-contracts@3.4.0'
dotenv: .env
Can anyone help me? Thank you!