2
호출이 아니고이 내 코드입니다 :파이썬 - 형식 오류가 : '모듈'개체가 내 응용 프로그램에 <a href="https://github.com/ui/rq-scheduler" rel="nofollow noreferrer">rq_scheduler</a> 라이브러리를 사용하려면
import telepot
import sys
import time
import schedule
import datetime
from redis import Redis
from rq_scheduler import Scheduler
scheduler = Scheduler(connection=Redis())
def handle():
print("hello")
def main():
scheduler.enqueue_at(datetime(2017, 9, 11, 22, 41),handle)
if __name__ == '__main__':
main()
난이 얻을 : 업데이트 :
Traceback (most recent call last):
File "***\__init__.py", line 22, in <module>
main()
File "***\__init__.py", line 18, in main
scheduler.enqueue_at(datetime(2017, 9, 11, 22, 41),handle)
TypeError: 'module' object is not callable
1- 내 실수는 어디에 있습니까? 내가 왜 이걸 얻는거야?
아마도 https://stackoverflow.com/questions/4534438/typeerror-module-object-is-not-callable의 중복 – Akash
은 'datetime.datetime (...)'이어야합니다. – PRMoureu
@Akash . 나는 이것을 닫는 것을 주저 할 것이지만, 그 질문의 중복이있다. 위키 백과 문서 "모듈 다음에 명명 된 Python 클래스 목록"이 있어야합니다. :) – chepner