brownie
brownie copied to clipboard
ModuleNotFoundError: No module named 'Users.t'
This error shows up even if I just run a simple script:

t.lolaev@t-lolaev freaky-goblins % brownie run scripts/deploy.py
Brownie v1.16.4 - Python development framework for Ethereum
FreakyGoblinsProject is the active project.
Launching 'ganache-cli --port 8545 --gasLimit 12000000 --accounts 10 --hardfork istanbul --mnemonic brownie'...
File "brownie/_cli/run.py", line 49, 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 "/Library/Frameworks/Python.framework/Versions/3.8/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
ModuleNotFoundError: No module named 'Users.t'
Terminating local RPC client...
UPD
The problem is that my home directory is called t.lolaev
. I solved the problem by moving the project outside of this directory (to the /Users
folder)
Please fix this so that other users with a dot in the name of the home directory do not have such problems
you saved my three day effort. i truly happy now . thank you very very much my respectful bro. :-))
hi @bodasooqa are you know what happening my deployment. I deploy my contract. but it not deployed in rinkeby.etherscan, only making transaction. I can not see my contract like mr.Patrick NFT/ERC-721/Collectible END-TO-END TUTORIAL | Deploy, List on Opensea, Host Metadata on IPFS lesson. https://www.youtube.com/watch?v=p36tXHX1JD8&t=126s at 7.8
my result PS C:\NFT\nft> brownie run scripts/simple_collectible/deploy_simple.py --network rinkeby INFO: Could not find files for the given pattern(s). Brownie v1.16.4 - Python development framework for Ethereum
NftProject is the active project.
Running 'scripts\simple_collectible\deploy_simple.py::main'... rinkeby Transaction sent: 0x5eb6135e410a463ba85bb049f7a387f38b662308a700e8964ca2f5748b14a3b0 Gas price: 1.000000011 gwei Gas limit: 2017295 Nonce: 2 SimpleCollectible.constructor confirmed Block: 9486528 Gas used: 1833905 (90.91%) SimpleCollectible deployed at: 0x1B3A35c86A499fa4A02b2Ccf05aca704f5044Cc5' In here missing pieaces In Patrick's youtube lesson 6:41 PS C:\NFT\nft>
@Nyamgavaa
Hi! If I were you, I would try to clone the project in its initial state, specify the necessary data and run the script Also, make sure that you are looking specifically at the Opensea testnet and that your Metamask wallet is configured for the Rinkeby network So far there is too little input data that I could draw any conclusions :)
Thank you so much @bodasooqa, you saved my life!!!
UPD
The problem is that my home directory is called
t.lolaev
. I solved the problem by moving the project outside of this directory (to the/Users
folder)Please fix this so that other users with a dot in the name of the home directory do not have such problems
this works if your on mac!! god i hate this issue LOL
Thank you. I had the same problem on windows10
moving folder to other directory on windows11 worked.
PS: I've got no dot in my home directory name.
For Future references, A number(1,2,3....) or a dot(.) in the name of your directories is possibly a reason for this error. Try to keep your path clean of these until there is a patch for this.
Any update on this? Don't want to have to ask my IT admin to change my computers username
Any update on this? Don't want to have to ask my IT admin to change my computers username
Change directory to C:/
I am also having same issue but I don't have Mac. I made scripts folder and the brownie project folder as pythonpath but then also getting the error. Please help.
@fivetran-connorbrereton, take a look at CountZer0's change here: https://github.com/eth-brownie/brownie/pull/1446 and try and implement that code change into ur brownie code and retry running things. Not sure if CountZer0's change will work but it is probably worth a try.
Okay, so problem is _import_from_path( )
function.
Refer this discussion for complete details :- https://stackoverflow.com/questions/68721661/eth-brownie-no-module-named-users-someuser/72063674#72063674
I can't exactly elaborate what's wrong with the function but all I can say that the condition for "disk partition" is not kept in mind while writing this function. hence, it works fine in linux.
Possible Solution :-
- Move your project to the drive where pip install packages. ( C:// drive in my case). It worked for me.
- change the code of
_import_from_path( )
function as described in stackoverflow's answer.
Expected help from community :- Please improve this code in subsequent versions of brownie.
UPD
The problem is that my home directory is called
t.lolaev
. I solved the problem by moving the project outside of this directory (to the/Users
folder)Please fix this so that other users with a dot in the name of the home directory do not have such problems
my directory has not dot in the name and even it's in the users folder even then I am getting this error. Pls solve my issue
Okay, so problem is
_import_from_path( )
function.Refer this discussion for complete details :- https://stackoverflow.com/questions/68721661/eth-brownie-no-module-named-users-someuser/72063674#72063674
I can't exactly elaborate what's wrong with the function but all I can say that the condition for "disk partition" is not kept in mind while writing this function. hence, it works fine in linux.
Possible Solution :-
- Move your project to the drive where pip install packages. ( C:// drive in my case). It worked for me.
- change the code of
_import_from_path( )
function as described in stackoverflow's answer.Expected help from community :- Please improve this code in subsequent versions of brownie.
Thanks for your suggestion!
I copied the code of the function _import_from_path
from this discussion and updated browine/project/scripts.py
. It works so great.
@poloxue You just made my day 😄. I posted it a year ago and received a notification now. I've left blockchain space but I'm glad I left some important footprints.