Comments (11)
ZainAchak? Are you still with us??
from defi_pancakeswapbot.
ABI is taken from BSCScan, First, try to find if the token does exist on the Bscscan website, If yes then try to search if the chart for that token is available on PooCoin or Arken website. If these both exist then share the address with me, I'll try to figure it out. :))
from defi_pancakeswapbot.
Hi ZainAchak!
Thanks for taking the time to answer and sorry for being impatient.
The Hamster (HAM) coin is available on both:
https://poocoin.app/tokens/0xb7b36ca86685af52186f1f9394e91d115a9da654
But still getting the same error:
Traceback (most recent call last):
File "C:\PancakeSwapBot\abi.py", line 17, in tokenAbi
with open(f"data/{filename}") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/ABI_0xb7b36CA86685Af52186f1f9394e91d115A9Da654.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PancakeSwapBot\DeFiTranscation.py", line 291, in <module>
runCode()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 133, in runCode
BNB_balance, TokenSymbol, NoOfTokens, params = InitializeTrade()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 66, in InitializeTrade
sellTokenAbi = tokenAbi(TokenToSellAddress, driver)
File "C:\PancakeSwapBot\abi.py", line 21, in tokenAbi
abi = findAbi(address, driver)
File "C:\PancakeSwapBot\abi.py", line 41, in findAbi
driver.get("chrome://settings/clearBrowserData");
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Malformed URL: URL constructor: chrome://settings/clearBrowserData is not a valid URL.
Probably I am doing something wrong, but no clue to be honest... :(
Regards
from defi_pancakeswapbot.
For this specific Token ABI, the script isn't working properly because of the wrong decimal indication.
You can try this decimalData.py script, replace it within your script. It worked for me, and for HAM use this address: 0x679d5b2d94f454c950d683d159b87aa8eae37c9e
def getTokenDecimal(decimal):
decimal = int("1" + str("0" * decimal))
decimalsDict = {"wei": 1,
"kwei": 1000,
"babbage": 1000,
"femtoether": 1000,
"mwei": 1000000,
"lovelace": 1000000,
"picoether": 1000000,
"gwei": 1000000000,
"shannon": 1000000000,
"nanoether": 1000000000,
"nano": 1000000000,
"szabo": 1000000000000,
"microether": 1000000000000,
"micro": 1000000000000,
"finney": 1000000000000000,
"milliether": 1000000000000000,
"milli": 1000000000000000,
"ether": 1000000000000000000,
"kether": 1000000000000000000000,
"grand": 1000000000000000000000,
"mether": 1000000000000000000000000,
"gether": 1000000000000000000000000000,
"tether": 1000000000000000000000000000000}
# list out keys and values separately
key_list = list(decimalsDict.keys())
val_list = list(decimalsDict.values())
# print key with val 100
# position = key_list[position]
if decimal in val_list:
position = val_list.index(decimal)
position = key_list[position]
return key_list[position]
else:
return key_list[7]
from defi_pancakeswapbot.
Sorry, changed both, but still getting an error:
Traceback (most recent call last):
File "C:\PancakeSwapBot\abi.py", line 17, in tokenAbi
with open(f"data/{filename}") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/ABI_0x679D5b2d94f454c950d683D159b87aa8eae37C9e.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\PancakeSwapBot\DeFiTranscation.py", line 291, in <module>
runCode()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 133, in runCode
BNB_balance, TokenSymbol, NoOfTokens, params = InitializeTrade()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 66, in InitializeTrade
sellTokenAbi = tokenAbi(TokenToSellAddress, driver)
File "C:\PancakeSwapBot\abi.py", line 21, in tokenAbi
abi = findAbi(address, driver)
File "C:\PancakeSwapBot\abi.py", line 41, in findAbi
driver.get("chrome://settings/clearBrowserData");
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
self.execute(Command.GET, {'url': url})
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Malformed URL: URL constructor: chrome://settings/clearBrowserData is not a valid URL.
from defi_pancakeswapbot.
And when I re-run the command another time I get a different error:
Traceback (most recent call last):
File "C:\PancakeSwapBot\DeFiTranscation.py", line 291, in <module>
runCode()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 133, in runCode
BNB_balance, TokenSymbol, NoOfTokens, params = InitializeTrade()
File "C:\PancakeSwapBot\DeFiTranscation.py", line 70, in InitializeTrade
BNB_balance = web3.eth.get_balance(walletAddress)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\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:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\method.py", line 202, in process_params
_apply_request_formatters(params, self.request_formatters(method)))
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\eth_utils\functional.py", line 45, in inner
return callback(fn(*args, **kwargs))
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\method.py", line 52, in _apply_request_formatters
formatted_params = pipe(params, request_formatters)
File "cytoolz\functoolz.pyx", line 667, in cytoolz.functoolz.pipe
File "cytoolz\functoolz.pyx", line 642, in cytoolz.functoolz.c_pipe
File "cytoolz\functoolz.pyx", line 505, in cytoolz.functoolz.Compose.__call__
File "cytoolz\functoolz.pyx", line 254, in cytoolz.functoolz.curry.__call__
File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\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
File "cytoolz\functoolz.pyx", line 642, in cytoolz.functoolz.c_pipe
File "cytoolz\functoolz.pyx", line 254, in cytoolz.functoolz.curry.__call__
File "cytoolz\functoolz.pyx", line 250, in cytoolz.functoolz.curry.__call__
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\abi.py", line 833, in data_tree_map
return recursive_map(map_to_typed_data, data_tree)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\decorators.py", line 30, in wrapped
wrapped_val = to_wrap(*args)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\formatters.py", line 89, in recursive_map
items_mapped = map_collection(recurse, data)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\formatters.py", line 76, in map_collection
return datatype(map(func, collection))
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\formatters.py", line 88, in recurse
return recursive_map(func, item)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\decorators.py", line 30, in wrapped
wrapped_val = to_wrap(*args)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\formatters.py", line 90, in recursive_map
return func(items_mapped)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\abi.py", line 830, in map_to_typed_data
return ABITypedData(func(*elements))
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\normalizers.py", line 78, in wrapper
modified = to_wrap(type_str, data)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\normalizers.py", line 196, in abi_address_to_hex
validate_address(data)
File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\web3\_utils\validation.py", line 177, in validate_address
raise TypeError('Address {} must be provided as a string'.format(value))
TypeError: Address None must be provided as a string
And yes, I did put the address inside the quotes...
from defi_pancakeswapbot.
Other than using CMD, I also tried running it with Powershell. Same (2nd) error...
from defi_pancakeswapbot.
It don't know why this error comes up for you, Because I've tried the same script for the HAM address and it worked for me perfectly. Try to use another bsc token and see if you get the same error or not.
from defi_pancakeswapbot.
from defi_pancakeswapbot.
Going to redo the whole Puthon installation on a new Windows 10 installation. Let's see if that helps...
I have no clue what the error message means, which I posted.
from defi_pancakeswapbot.
HI HHawk,
Didn't work for you because I have the same error!!
from defi_pancakeswapbot.
Related Issues (20)
- Swap to other token then WBNB? HOT 1
- Bot not Working!!!! HOT 5
- support BUSD ? HOT 3
- I had to re-open ticket Error message, cannot get it up and running?? #12 HOT 15
- Question HOT 1
- On Ubuntu 20.04 HOT 1
- busd HOT 1
- ERROR START HOT 1
- Sound alert
- TRANSFER_FAILED HOT 4
- Value transfer did not complete from a contract execution reverted
- How to run on MacOS HOT 2
- Runtime Error HOT 1
- I cannot start bot
- Feature request - Automation HOT 2
- Issue Sell HOT 1
- Win32gui requirements file error. HOT 11
- Run on linux? HOT 1
- Address None must be provided as a string HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from defi_pancakeswapbot.