is it still working?
Closed this issue · 6 comments
(.venv_p2p_bot) ➜ ton_p2p_bot git:(main) ✗ python tg-p2p.py Traceback (most recent call last): File "/Users/bernard/Dev/ton_p2p_bot/tg-p2p.py", line 1, in <module> from pyTelegramWalletApi import Wallet, Client ModuleNotFoundError: No module named 'pyTelegramWalletApi'
Getting this error yet i have already installed the library using pip
The error ModuleNotFoundError: No module named 'pyTelegramWalletApi'
indicates that Python can't find the module pyTelegramWalletApi
. Here's how to resolve it:
-
Ensure the module is installed. Run the following command in your virtual environment:
pip install pyTelegramWalletApi
-
Check the module name.
Verify that the module name in your code is correct and matches the installed module. -
Verify the virtual environment.
Make sure you have activated the correct virtual environment where the module is installed.
If these steps don't resolve the issue, the module might not be available on PyPI or could be misspelled.
Hello when i run this `import time
from wallet import Wallet
w = Wallet.token_from_file('token.txt') # load token from file method
while True:
try:
o = w.get_p2p_market('TON', 'RUB', 'SALE', desired_amount=5000)[0]
print(f'Top offer ID: {o.id}\n'
f'Price: {o.price.value} {o.price.quoteCurrencyCode}\n'
f'Volume: {o.availableVolume} TON\n'
f'User: {o.user.nickname} | Orders: {o.user.statistics.totalOrdersCount}\n'
f'=============================')
"""
Top offer ID: 187885
Price: 590.0 RUB
Volume: 30.682475494 TON
User: Lucky Goose | Orders: 3127
=============================
"""
except Exception as e:
print(f"[!] Error: {e}")
time.sleep(5)`
i get this error
ModuleNotFoundError: No module named 'blinker._saferef'
pip uninstall blinker
pip install blinker==1.7.0
The fix above worked :)
I am trying to run this
from wallet import Wallet
w = Wallet.token_from_file('token.txt') # load token from file method
new_offer = w.create_p2p_offer(
comment='Hello',
currency='TON',
fiat='RUB',
amount=10,
margine=90,
offer_type='PURCHASE',
order_min_price=500,
pay_methods=['tinkoff'],
)
w.activate_p2p_offer(new_offer.id, new_offer.type)
But am getting this error
[!] Request error: API ERROR - {"status":"INVALID_REQUEST","message":"JSON decoding error"}. Try attempt #1 [!] Request error: API ERROR - {"status":"INVALID_REQUEST","message":"JSON decoding error"}. Try attempt #2 [!] Request error: API ERROR - {"status":"INVALID_REQUEST","message":"JSON decoding error"}. Try attempt #3 Traceback (most recent call last): File "/Users/19bk/Dev/Telegram/p2p/x.py", line 5, in <module> new_offer = w.create_p2p_offer( ^^^^^^^^^^^^^^^^^^^ File "/Users/19bk/Dev/Telegram/p2p/.venv/lib/python3.12/site-packages/wallet/rest/__init__.py", line 353, in create_p2p_offer self.request('offer/create', api_version='p2p/public-api/v2', method='POST', json_data=data)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/19bk/Dev/Telegram/p2p/.venv/lib/python3.12/site-packages/wallet/rest/__init__.py", line 91, in request raise Exception('[!] Request attempts end') Exception: [!] Request attempts end
pip install --upgrade pyTelegramWalletApi
Resolved working correctly now.