TypeError : 'str'및 'function'객체를 연결할 수 없습니다.

히데요시

내 파이썬 코드는 rmtp 비디오를 다운로드해야하지만 다음 오류가 발생합니다.

오류 : 'str'및 'function'개체를 연결할 수 없습니다.

이 오류를 본 적이 없습니다. 도와주세요!

cmd = 'rtmpdump -r -T "sdjsds8" -r "'+player+'" -a "vod" -f "WIN 13,0,0,182" -W "http://website.fr/components/com_vodvideo/mediaplayer/player-licensed.swf" -p "http://website.fr" -y "mp4:'+code+'" -o "MaVideo.flv'

내 코드는 다음과 같습니다.

import ConfigParser
import requests,re,os,sys
from xrez import quality_FHD
from xrez import quality_HD
from xrez import quality_SD

def Fonction_smil():
    global Resolution
config = ConfigParser.ConfigParser()
config.read('config.ini')
quality = config.get('SETTINGS', 'video_quality')
if quality == '1080p':
    Resolution = (quality_FHD('qualityFHD'))
elif quality == '720p':
    Resolution = (quality_HD('qualityHD'))
elif quality == '480p':
    Resolution = (quality_SD('qualitySD'))

url = Resolution

print "downloading with requests"
r = requests.get(url)
with open("video.smil", "wb") as code:
    code.write(r.content)


    mykey = open("/home/gaaara/adn/video.smil", "r")
    for text in mykey:
        match = re.search('base="(.*?)"', text)
    if match:
        vod_links =  str(match.group(1))

        print vod_links


        print 'telechargement de la video...'
        cmd = 'rtmpdump -v -T "fbfhfhfh" -r "'+ url +'" -a "vod" -f "WIN 13,0,0,182" -W "http://website.com/components/com_vodvideo/mediaplayer/player-licensed.swf" -p "http://website.com" -y "mp4:'+code+'" -o "mavideo.mp4"'
        os.system(cmd)

편집 : 주 스크립트에는이 오류가 있지만 smil.py에는 없습니다.

함수를 가져올 때

from smil import Fonction_smil

이 오류가 발생합니다.

역 추적 (최근 호출 마지막) : 파일 "start.py", 35 행, from smil import Fonction_smil 파일 "files / smil.py", 30 행, 일치하는 경우 : NameError : name 'match'is not defined

대 수도 원장

귀하의 url변수는 문자열,하지만 기능이 포함되어 있지 않습니다. 아마도 "..." + url() + "...".

귀하의 code변수는 파일이 아닌 문자열을 포함합니다. 따라서 +문자열로는 할 수 없습니다 . 이것이 다음 문제가 될 것입니다 :)

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

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

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

re.search () TypeError : 'str'및 'NoneType'객체를 연결할 수 없습니다.

분류에서Dev

TypeError : 'str'및 'float'개체를 연결할 수 없습니다. : Pandas

분류에서Dev

openerp는 'str'과 'function'객체를 연결할 수 없습니다.

분류에서Dev

Tkinter Label, TypeError : 'str'및 'instance'개체를 연결할 수 없습니다.

분류에서Dev

Python Selenium TypeError : 'str'및 'WebElement'개체를 연결할 수 없습니다.

분류에서Dev

TypeError : Flask의 'str'및 'float'개체를 MySQL과 연결할 수 없습니다.

분류에서Dev

Python 오류 : 'str'및 'builtin_function_or_method'개체를 연결할 수 없습니다.

분류에서Dev

TypeError : 'str'과 'NoneType'객체를 연결할 수 없습니다 .python BS4

분류에서Dev

Python TypeError : 인쇄를 시도 할 때 'str'및 'int'개체를 연결할 수 없습니다.

분류에서Dev

TypeError : '<class'str '>'유형의 개체를 연결할 수 없습니다. Series 및 DataFrame obj 만 유효합니다.

분류에서Dev

TypeError : scrapy.Request ()에 맞춤 URL을 배치 할 때 'str'및 'NoneType'개체를 연결할 수 없습니다.

분류에서Dev

TypeError : str에 바이트를 연결할 수 없습니다.

분류에서Dev

Python : TypeError : 'str'과 'int'를 연결할 수 없습니다.

분류에서Dev

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

분류에서Dev

형식 오류는 'str'및 'ErrorList'개체를 연결할 수 없습니다.

분류에서Dev

Python TypeError : 메시지의 이메일 본문 부분에서 'str'및 'list'개체를 연결할 수 없습니다.

분류에서Dev

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

분류에서Dev

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

분류에서Dev

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

분류에서Dev

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

분류에서Dev

str.replace를 사용하면 TypeError : 'str'객체를 정수로 해석 할 수 없습니다.

분류에서Dev

TypeError : 'str'을 연결할 수 없습니다.

분류에서Dev

django-selenium TypeError : 'str'개체를 호출 할 수 없습니다.

분류에서Dev

xml에 디렉터리 목록- 'str'및 'NoneType'개체를 연결할 수 없습니다. 처리 방법?

분류에서Dev

f- 문자열 표현식 내의 TypeError- 'str'객체를 호출 할 수 없습니다

분류에서Dev

TypeError : 'int'객체를 str 암시 적으로 오류 파이썬으로 변환 할 수 없습니다.

분류에서Dev

TypeError : 'int'객체를 암시 적으로 str로 변환 할 수 없습니다 (python)

분류에서Dev

TypeError : 'int'객체를 pascode 시스템에 대해 암시 적으로 str로 변환 할 수 없습니다.

분류에서Dev

TypeError : 'str'개체는 MySQL에서 호출 할 수 없습니다.

Related 관련 기사

  1. 1

    re.search () TypeError : 'str'및 'NoneType'객체를 연결할 수 없습니다.

  2. 2

    TypeError : 'str'및 'float'개체를 연결할 수 없습니다. : Pandas

  3. 3

    openerp는 'str'과 'function'객체를 연결할 수 없습니다.

  4. 4

    Tkinter Label, TypeError : 'str'및 'instance'개체를 연결할 수 없습니다.

  5. 5

    Python Selenium TypeError : 'str'및 'WebElement'개체를 연결할 수 없습니다.

  6. 6

    TypeError : Flask의 'str'및 'float'개체를 MySQL과 연결할 수 없습니다.

  7. 7

    Python 오류 : 'str'및 'builtin_function_or_method'개체를 연결할 수 없습니다.

  8. 8

    TypeError : 'str'과 'NoneType'객체를 연결할 수 없습니다 .python BS4

  9. 9

    Python TypeError : 인쇄를 시도 할 때 'str'및 'int'개체를 연결할 수 없습니다.

  10. 10

    TypeError : '<class'str '>'유형의 개체를 연결할 수 없습니다. Series 및 DataFrame obj 만 유효합니다.

  11. 11

    TypeError : scrapy.Request ()에 맞춤 URL을 배치 할 때 'str'및 'NoneType'개체를 연결할 수 없습니다.

  12. 12

    TypeError : str에 바이트를 연결할 수 없습니다.

  13. 13

    Python : TypeError : 'str'과 'int'를 연결할 수 없습니다.

  14. 14

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

  15. 15

    형식 오류는 'str'및 'ErrorList'개체를 연결할 수 없습니다.

  16. 16

    Python TypeError : 메시지의 이메일 본문 부분에서 'str'및 'list'개체를 연결할 수 없습니다.

  17. 17

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

  18. 18

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

  19. 19

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

  20. 20

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

  21. 21

    str.replace를 사용하면 TypeError : 'str'객체를 정수로 해석 할 수 없습니다.

  22. 22

    TypeError : 'str'을 연결할 수 없습니다.

  23. 23

    django-selenium TypeError : 'str'개체를 호출 할 수 없습니다.

  24. 24

    xml에 디렉터리 목록- 'str'및 'NoneType'개체를 연결할 수 없습니다. 처리 방법?

  25. 25

    f- 문자열 표현식 내의 TypeError- 'str'객체를 호출 할 수 없습니다

  26. 26

    TypeError : 'int'객체를 str 암시 적으로 오류 파이썬으로 변환 할 수 없습니다.

  27. 27

    TypeError : 'int'객체를 암시 적으로 str로 변환 할 수 없습니다 (python)

  28. 28

    TypeError : 'int'객체를 pascode 시스템에 대해 암시 적으로 str로 변환 할 수 없습니다.

  29. 29

    TypeError : 'str'개체는 MySQL에서 호출 할 수 없습니다.

뜨겁다태그

보관