0

Ошибка с функцией license_test, когда я её запускаю выдаётся ошибка

TypeError: license_test() missing 1 required positional argument: 'identificator'

но как я же передал DUCK43

from pymongo import *
class eao():
    client = MongoClient('mongodb+srv://easyantiobman:[email protected]/test?retryWrites=true&w=majority')
    db = client['easyantiobman']
    collection = db['easyantiobman']
    def license_test(self, identificator):
        a=self.collection.find_one({'_id':identificator})
        print(a['license'])
        pass

jas = eao
jas.license_test('DUCK43')

1 ответ 1

1

Передал, да не туда. Объекты класса создаются со скобками:

jas = eao()

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.