If you're experiencing issues with wallet creation in TradeSeer Bot, this guide will help you resolve them.
The wallet creation feature requires specific Python packages. Run this test:
python test_wallet_creation.pyIf the test fails, you'll see which dependencies are missing.
python install_dependencies.pypip install web3 eth-account cryptography Flask requests python-dotenvSolution:
pip install eth-accountSolution:
pip install cryptographySolution:
pip install web3Solution:
- Ensure the bot has write permissions to the current directory
- Check if
tradeseer_bot.dbfile is not locked by another process
Requirements:
- Minimum 8 characters
- Can contain letters, numbers, and special characters
Example valid password:
MySecurePassword123!
python test_wallet_creation.pyExpected output:
🧪 TradeSeer Wallet Creation Test Suite
==================================================
🔍 Testing dependencies...
✅ Web3 available
✅ eth_account available
✅ cryptography available
🔐 Testing wallet creation...
✅ Account created successfully
📍 Address: 0x...
🔑 Private key length: 64 characters
✅ Private key encrypted successfully
🔒 Encrypted key length: ... bytes
✅ Private key decrypted successfully
🗄️ Testing database...
✅ Database tables created successfully
✅ Test database cleaned up
==================================================
🎉 All tests passed! Wallet creation should work properly.
- Start the bot:
python bot.py - Send message:
create wallet name:TestWallet password:MyPassword123! - You should receive a success message with wallet address
If automatic installation fails, install packages manually:
# Core dependencies
pip install Flask==2.3.3
pip install requests==2.31.0
pip install python-dotenv==1.0.0
# Web3 and blockchain
pip install web3==6.11.3
pip install eth-account==0.9.0
pip install eth-utils==2.2.0
# Cryptography
pip install cryptography==41.0.7Create a .env file with:
TELEGRAM_BOT_TOKEN=your_bot_token_here
ETHERSCAN_API_KEY=your_etherscan_api_key_here
WEBHOOK_URL=your_webhook_url_here
# Create virtual environment
python -m venv venv
# Activate (Windows)
venv\Scripts\activate
# Activate (Linux/Mac)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtcreate wallet name:WalletName password:YourPassword123!
create wallet name:TradingWallet password:SecurePass123!
- ✅ Creates new Ethereum wallet
- ✅ Encrypts private key with your password
- ✅ Stores encrypted key securely in database
- ✅ Returns wallet address for funding
- 🔒 Private keys encrypted with PBKDF2
- 🔑 Password-based encryption
- 🗄️ Secure database storage
- 🚫 No plaintext private key storage
Look for these messages when starting the bot:
✅ Account creation available
✅ Cryptography features available
✅ Wallet features available
If you see ❌ instead of ✅, the dependencies are missing.
| Error | Solution |
|---|---|
ModuleNotFoundError: No module named 'eth_account' |
pip install eth-account |
ModuleNotFoundError: No module named 'cryptography' |
pip install cryptography |
ModuleNotFoundError: No module named 'web3' |
pip install web3 |
Password must be at least 8 characters long |
Use longer password |
Database locked |
Restart bot, check file permissions |
- Run the test script:
python test_wallet_creation.py - Check the output for specific error messages
- Install missing dependencies as indicated
- Restart the bot and try again
When wallet creation is working properly, you should see:
-
Bot startup messages:
✅ Account creation available ✅ Cryptography features available ✅ Wallet features available -
Successful wallet creation:
✅ Wallet Created Successfully! 🏷️ Name: MyWallet 📍 Address: 0x... 🔗 Network: Base Network -
Database tables created:
✅ Database initialized with wallet connection support
Need more help? Check the main README.md file or run the test scripts to diagnose specific issues.