D
D
Dex9er2022-03-02 22:24:46
Python
Dex9er, 2022-03-02 22:24:46

How to fix errors with telegram bot libraries?

Here is a piece of code (Tried to run on the hosting https://www.pythonanywhere.com )

### modules ###
import json
from pyqiwip2p import QiwiP2P
from pyqiwip2p.types import QiwiCustomer, QiwiDatetime
import sqlite3
from sqlite3 import Error
import menu as kb
from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor, exceptions
from aiogram.dispatcher.filters import Text
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton, ReplyKeyboardRemove
from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.dispatcher import FSMContext
from aiogram.dispatcher.filters.state import StatesGroup, State
from aiogram.dispatcher import FSMContext
from aiogram.contrib.fsm_storage.memory import MemoryStorage
import asyncio
import aiohttp
from aiogram.types import CallbackQuery
from models import *
from telebot import TeleBot

here are the errors
Traceback (most recent call last):
  File "/home/Dex9er/TELEGRAM2/main.py", line 7, in <module>
    import menu as kb
  File "/home/Dex9er/TELEGRAM2/./menu.py", line 1, in <module>
    from aiogram import types
ModuleNotFoundError: No module named 'aiogram'

I apologize right away if the solution to the problem is easy, I'm just new to this, and this is the finished code that I wanted to run

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladika_andrii, 2022-03-03
@Vladika_andrii

Hey! Hosting, an analogue of your computer, only you get access remotely. You need to install the library in the same way as on your PC. You don't have 'aiogram' libraries installed on your hosting, run a terminal, go to the virtual environment and activate it (or create a virtual environment if you haven't already done so and activate it) Next, install the required library with the pip install aiogram command. Hope it helped.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question