Exception in thread Thread-1 (function):
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner
self.run()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run
self._target(*self._args, *self._kwargs)
File "C:\Users\Administrator\Desktop\trading\utils.py", line 79, in function
self.result = target(args, **kwargs)
File "C:\Users\Administrator\Desktop\trading\utils.py", line 350, in buyTokensWithOtherToken
toBuyAmount = web3.toWei(kwargs.get('Amount'))
TypeError: to_wei() missing 1 required positional argument: 'unit'
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\trading\main.py", line 258, in
tx, Lasttrade_message = transaction.result
AttributeError: 'ThreadWithResult' object has no attribute 'result'
I believe it is related to the function buying specific amount, probably need convert the amount to Wei, I will check today night and add a new version fixing!
Thank you for the feedback!
Exception in thread Thread-1 (function): Traceback (most recent call last): File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1009, in _bootstrap_inner self.run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\threading.py", line 946, in run self._target(*self._args, *self._kwargs) File "C:\Users\Administrator\Desktop\trading\utils.py", line 79, in function self.result = target(args, **kwargs) File "C:\Users\Administrator\Desktop\trading\utils.py", line 350, in buyTokensWithOtherToken toBuyAmount = web3.toWei(kwargs.get('Amount')) TypeError: to_wei() missing 1 required positional argument: 'unit' Traceback (most recent call last): File "C:\Users\Administrator\Desktop\trading\main.py", line 258, in
tx, Lasttrade_message = transaction.result
AttributeError: 'ThreadWithResult' object has no attribute 'result'