인프런 커뮤니티 질문&답변

조우진님의 프로필 이미지

작성한 질문수

워드프레스 자동 포스팅 프로그램 개발 강의 (ChatGPT API)

워드프레스에 python으로 글 업로드하는 방법

업로드가 되지 않습니다.

24.03.20 22:29 작성

·

200

0

안녕하세요, 수강중인 학생입니다.

 

3.upload.py 부터 코드가 제대로 동작하지 않습니다.

 

raise RemoteDisconnected("Remote end closed connection without"

http.client.RemoteDisconnected: Remote end closed connection without response

 

이런 내용으로 인해 글이 올라가지 않는데 원인이 무엇일까요?

답변 2

0

Jason Choi님의 프로필 이미지

2024. 08. 27. 23:20

안녕하세요 강사님,

저는 Client 부분 부터 에러가 발생합니다

패키지들은 잘 설치 했는데, 어떤 문제인지 모르겠습니다.

(전 Mac 사용 중이고, 파이썬 버젼은 3.11 씁니다)

 

파이썬 실행하면, 아래와 같은 에러메시지가 나옵니다.

 

Traceback (most recent call last):

File "/Users/mati/coding/wp_auto/3.upload.py", line 14, in <module>

client = Client(site_url, username, password)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/mati/coding/wp_auto/coding/wp_auto/lib/python3.11/site-packages/wordpress_xmlrpc/base.py", line 24, in init

self.supported_methods = self.server.mt.supportedMethods()

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1122, in call

return self.__send(self.__name, args)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1464, in __request

response = self.__transport.request(

^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1166, in request

return self.single_request(host, handler, request_body, verbose)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1179, in single_request

resp = http_conn.getresponse()

^^^^^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1378, in getresponse

response.begin()

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 318, in begin

version, status, reason = self._read_status()

^^^^^^^^^^^^^^^^^^^

File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 287, in readstatus

raise RemoteDisconnected("Remote end closed connection without"

http.client.RemoteDisconnected: Remote end closed connection without response

0

김지유님의 프로필 이미지
김지유
지식공유자

2024. 03. 22. 12:26

사용하시는 워드프레스의 호스팅 서비스가 무엇입니까?

 

호스팅 서비스에 따라 설정할것이 추가로 필요한 경우가 있습니다.

조우진님의 프로필 이미지
조우진
질문자

2024. 03. 22. 13:02

영상에서 설명하신대로 cloudways를 사용하였으며, ddns 설정이 안되어 있긴 합니다.