TypeError : '모듈'객체는 Python3을 호출 할 수 없습니다.

높은 산

안녕하세요 run.py 실행을 시도했지만 오류 메시지가 나타납니다!

Run.py

from modules import HTTPHeaders
site = "https://google.com"
HTTPHeaders(site, _verbose=True)

HTTPHeaders.py

import dns
import dns.resolver
def HTTPHeaders(site, _verbose=None):
if _verbose != None:
    try:
        r = http.request('GET', "http://"+site)
    except:
        pass

    if (r.status == 200):
        print("HTTP/1.1 200 OK")
    else:
        print(r.status)
    try:
        print("Content-Type : "+r.headers['Content-Type'])
    except:
        pass
    try:
        print("Server : "+r.headers['Server'])
    except:
        pass
    try:
        print("Set-Cookie : "+r.headers['Set-Cookie'])
    except:
        pass

내 오류 :

    TypeError: 'module' object is not callable

이 오류를 어떻게 해결할 수 있습니까? 감사합니다 :)

sanitizedUser

이 시도:

from modules import HTTPHeaders
HTTPHeaders.HTTPHeaders(...)

모듈 자체를 가져 왔으므로 점 표기법을 사용하여 함수에 액세스해야합니다.

또는 다음과 같이 함수를 가져옵니다.

from modules.HTTPHeaders import HTTPHeaders
HTTPHeaders(...)

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

TypeError : '모듈'객체는 Spacy Python에서 호출 할 수 없습니다.

분류에서Dev

Python / Pygame : TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

Python TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

TypeError : 'dict'객체는 python3을 호출 할 수 없습니다.

분류에서Dev

Python 모듈 문제 : TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

TypeError : 'int'객체는 Python 3을 호출 할 수 없습니다.

분류에서Dev

'모듈'개체의 TypeError는 호출 할 수 없습니다.

분류에서Dev

Python timeit-TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

TypeError '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

Python / Pygame TypeError : 'str'객체는 호출 할 수 없습니다.

분류에서Dev

Python 3.4 : TypeError : 'str'객체는 호출 할 수 없습니다.

분류에서Dev

TypeError : 'str'객체는 호출 할 수 없습니다-Python

분류에서Dev

TypeError : 'float'객체는 Python에서 호출 할 수 없습니다.

분류에서Dev

TypeError : 'int'객체는 Python으로 호출 할 수 없습니다.

분류에서Dev

Python Tkinter TypeError : 'int'객체는 호출 할 수 없습니다.

분류에서Dev

TypeError 'str'객체는 호출 할 수 없습니다-Python

분류에서Dev

TypeError : '모듈'개체는 Django 3 렌더링 함수를 호출 할 수 없습니다.

분류에서Dev

Pytorch 1.7.0 | DataLoader 오류-TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

/ api / register / '모듈'개체의 TypeError를 호출 할 수 없습니다.

분류에서Dev

EasyGUI 및 SimpleCV- TypeError : '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

TypeError 'bool'객체는 django에서 호출 할 수 없습니다.

분류에서Dev

TypeError : 'int'객체는 호출 할 수 없습니다 .``, len ()

분류에서Dev

TypeError : 'bool'개체는 함수 호출을 위해 호출 할 수 없습니다.

분류에서Dev

TypeError : 'str'객체는 Python을 통해 Selenium을 사용하여 호출 할 수 없습니다.

분류에서Dev

TypeError : 'str'객체는 Python을 통해 Selenium을 사용하여 호출 할 수 없습니다.

분류에서Dev

Python str () : TypeError : 'str'객체를 호출 할 수 없습니다-중지 코드

분류에서Dev

"모듈 객체를 호출 할 수 없습니다"란 무엇을 의미합니까?

분류에서Dev

TypeError : uwsgi / nginx를 사용하여 플라스크 앱을 배포하는 동안 '모듈'개체를 호출 할 수 없습니다.

분류에서Dev

TypeError : 'Connection'객체는 mysqldb를 사용하는 Python 스크립팅에서 호출 할 수 없습니다.

Related 관련 기사

  1. 1

    TypeError : '모듈'객체는 Spacy Python에서 호출 할 수 없습니다.

  2. 2

    Python / Pygame : TypeError : '모듈'개체를 호출 할 수 없습니다.

  3. 3

    Python TypeError : '모듈'개체를 호출 할 수 없습니다.

  4. 4

    TypeError : 'dict'객체는 python3을 호출 할 수 없습니다.

  5. 5

    Python 모듈 문제 : TypeError : '모듈'개체를 호출 할 수 없습니다.

  6. 6

    TypeError : 'int'객체는 Python 3을 호출 할 수 없습니다.

  7. 7

    '모듈'개체의 TypeError는 호출 할 수 없습니다.

  8. 8

    Python timeit-TypeError : '모듈'개체를 호출 할 수 없습니다.

  9. 9

    TypeError '모듈'개체를 호출 할 수 없습니다.

  10. 10

    Python / Pygame TypeError : 'str'객체는 호출 할 수 없습니다.

  11. 11

    Python 3.4 : TypeError : 'str'객체는 호출 할 수 없습니다.

  12. 12

    TypeError : 'str'객체는 호출 할 수 없습니다-Python

  13. 13

    TypeError : 'float'객체는 Python에서 호출 할 수 없습니다.

  14. 14

    TypeError : 'int'객체는 Python으로 호출 할 수 없습니다.

  15. 15

    Python Tkinter TypeError : 'int'객체는 호출 할 수 없습니다.

  16. 16

    TypeError 'str'객체는 호출 할 수 없습니다-Python

  17. 17

    TypeError : '모듈'개체는 Django 3 렌더링 함수를 호출 할 수 없습니다.

  18. 18

    Pytorch 1.7.0 | DataLoader 오류-TypeError : '모듈'개체를 호출 할 수 없습니다.

  19. 19

    / api / register / '모듈'개체의 TypeError를 호출 할 수 없습니다.

  20. 20

    EasyGUI 및 SimpleCV- TypeError : '모듈'개체를 호출 할 수 없습니다.

  21. 21

    TypeError 'bool'객체는 django에서 호출 할 수 없습니다.

  22. 22

    TypeError : 'int'객체는 호출 할 수 없습니다 .``, len ()

  23. 23

    TypeError : 'bool'개체는 함수 호출을 위해 호출 할 수 없습니다.

  24. 24

    TypeError : 'str'객체는 Python을 통해 Selenium을 사용하여 호출 할 수 없습니다.

  25. 25

    TypeError : 'str'객체는 Python을 통해 Selenium을 사용하여 호출 할 수 없습니다.

  26. 26

    Python str () : TypeError : 'str'객체를 호출 할 수 없습니다-중지 코드

  27. 27

    "모듈 객체를 호출 할 수 없습니다"란 무엇을 의미합니까?

  28. 28

    TypeError : uwsgi / nginx를 사용하여 플라스크 앱을 배포하는 동안 '모듈'개체를 호출 할 수 없습니다.

  29. 29

    TypeError : 'Connection'객체는 mysqldb를 사용하는 Python 스크립팅에서 호출 할 수 없습니다.

뜨겁다태그

보관