Git Product home page Git Product logo

Comments (19)

MazWolz avatar MazWolz commented on July 17, 2024

Having same issue. Installing the web3 module as directed doesn't seem to work.

I tried adding the node_modules folder to the pathway by creating a settings.json in the vscode folder as directed here. Still didn't work.

Also tried upgrading Python and installing web3.py instead of web3.js using $ pip install web3. The program was able to find the module however this was the log:

[Info] Web3 successfully connected
Traceback (most recent call last):
File "c:\xxx\BSCTokenSniper\BSCTokenSniper.py", line 105, in
updateTitle()
File "c:\xxx\BSCTokenSniper\BSCTokenSniper.py", line 101, in updateTitle
walletBalance = web3.fromWei(web3.eth.get_balance(walletAddress),'ether') #There are references to ether in the code but it's set to BNB, its just how Web3
was originally designed
File "C:\Python39\lib\site-packages\web3\module.py", line 53, in caller
(method_str, params), response_formatters = method.process_params(module, *args, **kwargs) # noqa: E501
File "C:\Python39\lib\site-packages\web3\method.py", line 194, in process_params
_apply_request_formatters(params, self.request_formatters(method)))
File "C:\Python39\lib\site-packages\eth_utils\functional.py", line 45, in inner
return callback(fn(*args, **kwargs))
File "C:\Python39\lib\site-packages\web3\method.py", line 50, in _apply_request_formatters
formatted_params = pipe(params, request_formatters)
File "cytoolz/functoolz.pyx", line 667, in cytoolz.functoolz.pipe
return c_pipe(data, funcs)
File "cytoolz/functoolz.pyx", line 642, in cytoolz.functoolz.c_pipe
data = func(data)
File "cytoolz/functoolz.pyx", line 505, in cytoolz.functoolz.Compose.call
ret = func(ret)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.call
return self.func(*args, **kwargs)
File "C:\Python39\lib\site-packages\web3_utils\abi.py", line 799, in map_abi_data
return pipe(data, *pipeline)
File "cytoolz/functoolz.pyx", line 667, in cytoolz.functoolz.pipe
return c_pipe(data, funcs)
File "cytoolz/functoolz.pyx", line 642, in cytoolz.functoolz.c_pipe
data = func(data)
File "cytoolz/functoolz.pyx", line 250, in cytoolz.functoolz.curry.call
return self.func(*args, **kwargs)
File "C:\Python39\lib\site-packages\web3_utils\abi.py", line 833, in data_tree_map
return recursive_map(map_to_typed_data, data_tree)
File "C:\Python39\lib\site-packages\web3_utils\decorators.py", line 30, in wrapped
wrapped_val = to_wrap(*args)
File "C:\Python39\lib\site-packages\web3_utils\formatters.py", line 89, in recursive_map
items_mapped = map_collection(recurse, data)
File "C:\Python39\lib\site-packages\web3_utils\formatters.py", line 76, in map_collection
return datatype(map(func, collection))
File "C:\Python39\lib\site-packages\web3_utils\formatters.py", line 88, in recurse
return recursive_map(func, item)
File "C:\Python39\lib\site-packages\web3_utils\decorators.py", line 30, in wrapped
wrapped_val = to_wrap(*args)
File "C:\Python39\lib\site-packages\web3_utils\formatters.py", line 90, in recursive_map
return func(items_mapped)
File "C:\Python39\lib\site-packages\web3_utils\abi.py", line 830, in map_to_typed_data
return ABITypedData(func(*elements))
File "C:\Python39\lib\site-packages\web3_utils\normalizers.py", line 78, in wrapper
modified = to_wrap(type_str, data)
File "C:\Python39\lib\site-packages\web3_utils\normalizers.py", line 196, in abi_address_to_hex
validate_address(data)
File "C:\Python39\lib\site-packages\web3_utils\validation.py", line 169, in validate_address
raise InvalidAddress(f"ENS name: '{value}' is invalid.")
web3.exceptions.InvalidAddress: ENS name: 'xxx' is invalid.

Is there away around this?

from blockchaintokensniper.

kelvionald avatar kelvionald commented on July 17, 2024

Install web3 from under venv (pip install web3)

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

C:\Users\dsobe>npm install Web3
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/Web3 failed, reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dsobe\AppData\Roaming\npm-cache_logs\2021-07-30T02_10_35_851Z-debug.log

This the error when I tried installing Web3

from blockchaintokensniper.

ntfargo avatar ntfargo commented on July 17, 2024

pip install web3 or pip install --upgrade web3

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

pip install web3 or pip install --upgrade web3

'pip' is not recognized as an internal or external command,
operable program or batch file.

from blockchaintokensniper.

ntfargo avatar ntfargo commented on July 17, 2024

pip install web3 or pip install --upgrade web3

'pip' is not recognized as an internal or external command,
operable program or batch file.

You need to add the path of your pip installation to your PATH system variable.
Open CMD with administrator.
and run this
setx PATH "%PATH%;C:\Python39\Scripts"

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

BytePhoenixCoding avatar BytePhoenixCoding commented on July 17, 2024

I have just installed python on my laptop (windows 8) and got it successfully to work. I installed python 3.9.6 and installed web3 using 'npm install web3' but that didn't work.

Fix that worked for me:
Try 'py -m pip install web3' or replace 'py' with python if you have a python older version.

Worked right away after that. Let me know if that works.

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

BytePhoenixCoding avatar BytePhoenixCoding commented on July 17, 2024

When I installed python I originally installed it in appdata path. I uninstalled and reinstalled it to C:/Python39 and suggest you do the same, made things easier for me.

Then try to run the script again, open cmd prompt this time and cd to directory where bsctokensniper.py is installed, and type 'python bsctokensniper.py' and enter, you should be able to read the error message that comes up (if any). Paste the error message contents after running it so I can see whats happening.

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

crypto-MMXXII avatar crypto-MMXXII commented on July 17, 2024

it's now working, I will let you know if ever got an issue. Thank you very much.

On Tue, Aug 3, 2021 at 7:16 PM bry razo @.> wrote: Done uninstalling Python39 and have installed under c:\Python39 folder. After restarting pc, I tried running the script on given instruction but I got an error as follows; 'Python' is not recognized as an internal or external command, operable program or batch file. I've tried typing 'py bsctokensniper.py' and got an error message too, 'Loading... Traceback (most recent call last); File "C:\BSCTokenSniper\bsctokensniper.py", line 3, in from web3 import Web3 ModuleNotFoundError: No module name 'web3' Thanks. On Tue, Aug 3, 2021 at 7:02 AM BytePhoenixData @.> wrote: > When I installed python I originally installed it in appdata path. I > uninstalled and reinstalled it to C:/Python39 and suggest you do the same, > made things easier for me. > > Then try to run the script again, open cmd prompt this time and cd to > directory where bsctokensniper.py is installed, and type 'python > bsctokensniper.py' and enter, you should be able to read the error message > that comes up (if any). Paste the error message contents after running it > so I can see whats happening. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#3 (comment)>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AU4SOIRG7PXB4YARU3PA5UDT24PYXANCNFSM477BQEPQ > . > Triage notifications on the go with GitHub Mobile for iOS > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email > . >

@ dsobe369 so how did you solve the issue. Thanks in advance

from blockchaintokensniper.

dsobe369 avatar dsobe369 commented on July 17, 2024

from blockchaintokensniper.

crypto-MMXXII avatar crypto-MMXXII commented on July 17, 2024

I just reinstall 'py -m pip install web3' and restart computer then its working fine. On Wed, Aug 18, 2021 at 2:15 AM BSC-Contarcts @.*> wrote:

it's now working, I will let you know if ever got an issue. Thank you very much. … <#m_4509628366066014142_> On Tue, Aug 3, 2021 at 7:16 PM bry razo @.
> wrote: Done uninstalling Python39 and have installed under c:\Python39 folder. After restarting pc, I tried running the script on given instruction but I got an error as follows; 'Python' is not recognized as an internal or external command, operable program or batch file. I've tried typing 'py bsctokensniper.py' and got an error message too, 'Loading... Traceback (most recent call last); File "C:\BSCTokenSniper\bsctokensniper.py", line 3, in from web3 import Web3 ModuleNotFoundError: No module name 'web3' Thanks. On Tue, Aug 3, 2021 at 7:02 AM BytePhoenixData @.
> wrote: > When I installed python I originally installed it in appdata path. I > uninstalled and reinstalled it to C:/Python39 and suggest you do the same, > made things easier for me. > > Then try to run the script again, open cmd prompt this time and cd to > directory where bsctokensniper.py is installed, and type 'python > bsctokensniper.py' and enter, you should be able to read the error message > that comes up (if any). Paste the error message contents after running it > so I can see whats happening. > > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > <#3 (comment) <#3 (comment)>>, > or unsubscribe > https://github.com/notifications/unsubscribe-auth/AU4SOIRG7PXB4YARU3PA5UDT24PYXANCNFSM477BQEPQ > . > Triage notifications on the go with GitHub Mobile for iOS > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email > . > @ dsobe369 so how did you solve the issue. Thanks in advance — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU4SOITA4VMPJSFEJPE6YA3T5KRKRANCNFSM477BQEPQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

Thanks as soon as i installed the correct visual C++ and reinstalled the pip intsall web3 it worked liuke a charm. the only issue now are the not showing colors described in py file. thanks mate

from blockchaintokensniper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.