Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XMLRPC 'client' error
#1
I'm trying to create a wordpress post through XMLRPC but getting this error

(env) sam@sam-H81M-S ~ $ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from wordpress_xmlrpc import Client, WordPressPost
>>> from wordpress_xmlrpc.methods.taxonomies import *
>>> from wordpress_xmlrpc.methods.posts import *
>>> from wordpress_xmlrpc.methods.users import *
>>> from wordpress_xmlrpc.methods import *
>>> wp_url = '``http://localhost/wordpress``'
>>> wp_username = 'admin'
>>> wp_password = ' ######## '
>>> post = WordPressPost()
>>> post.title = 'My Post'
>>> post.content = 'This is content'
>>> post.id = client.call(posts.NewPost(post))
Error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'client' is not defined
When I use Client I get this error instead

Error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: call() missing 1 required positional argument: 'method'
Reply


Messages In This Thread
XMLRPC 'client' error - by SamLearnsPython - Jul-02-2018, 11:58 AM
RE: XMLRPC 'client' error - by gontajones - Jul-02-2018, 01:05 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-02-2018, 01:42 PM
RE: XMLRPC 'client' error - by gontajones - Jul-02-2018, 04:16 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-02-2018, 06:53 PM
RE: XMLRPC 'client' error - by gontajones - Jul-02-2018, 07:14 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 06:01 AM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 09:37 AM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 01:39 PM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 01:43 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 05:06 PM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 05:51 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 06:05 PM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 06:10 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 06:23 PM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 06:32 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-03-2018, 06:45 PM
RE: XMLRPC 'client' error - by gontajones - Jul-03-2018, 06:50 PM
RE: XMLRPC 'client' error - by nilamo - Jul-03-2018, 09:17 PM
RE: XMLRPC 'client' error - by SamLearnsPython - Jul-04-2018, 11:51 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting "SSL client not supported by this Python installation" error prabirsarkar 0 1,088 Mar-13-2023, 05:01 PM
Last Post: prabirsarkar
  How to use xmlrpc from flrig? mamoman 3 1,278 Feb-10-2023, 06:25 PM
Last Post: Larz60+
  Error in Mysql Client when upgrading Django Abi 0 1,955 Sep-21-2020, 06:11 AM
Last Post: Abi
  Gnuradio python3 is not compatible python3 xmlrpc library How Can I Fix İt ? muratoznnnn 3 5,123 Nov-07-2019, 05:47 PM
Last Post: DeaD_EyE
  wordpress-python-xmlrpc. I can import 1 file. How do I import the entire folder? SamLearnsPython 0 3,362 Jul-05-2018, 06:21 AM
Last Post: SamLearnsPython
  xmlrpc.client, ServerProxy and null return thepurpleblob 0 3,112 Oct-26-2017, 10:26 AM
Last Post: thepurpleblob
  Error connecting to client rajeev1729 2 14,041 Sep-15-2017, 10:34 AM
Last Post: rajeev1729

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020