강의

멘토링

커뮤니티

Inflearn Community Q&A

to82358502's profile image
to82358502

asked

WordPress Auto Posting Program Development Course (ChatGPT API)

How to upload posts to WordPress with Python

업로드가 되지 않습니다.

Written on

·

364

0

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

 

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

 

raise RemoteDisconnected("Remote end closed connection without"

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

 

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

pythonwordpressopenaixmlrpcclientchatgpt

Answer 3

0

클라우드웨이즈에서
1. xmlrpc.php가 차단되어 있는 경우

Cloudways, 일부 워드프레스 호스팅은 xmlrpc.php 사용을 보안상 차단합니다.

🔎 확인 방법

브라우저에서 다음 주소로 이동해보세요:

bash

복사편집

https://wordpress-xxxxxxxxxxxx.cloudwaysapps.com/xmlrpc.php

  • "XML-RPC server accepts POST requests only." 메시지가 나오면 열려 있는 것

  • "403 Forbidden", "Access denied", "Not found"가 나오면 차단된 것

해결

Cloudways에서는 보통 Application Settings > Security에서 XML-RPC API Access를 허용해야 합니다.

찾아보니까
클라우드웨이즈에서
xmlrpc 접근 허용이 막혀있어서 안되는것입니다.
chatgpt에 에러코드상황 얘기해주니까 자세하게 알려줌!!
Application settings에서 xmlrpc 접근 막아져있는거 풀어주면 됩니다.


 

0

안녕하세요 강사님,

저는 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

lread90님의 프로필 이미지
lread90
Instructor

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

 

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

to82358502님의 프로필 이미지
to82358502
Questioner

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

to82358502's profile image
to82358502

asked

Ask a question