Skip to content

xml.parsers.expat.ExpatError: XML or text declaration not at start of entity: line 5, column 0 #146

@MuhammedEminK

Description

@MuhammedEminK

from wordpress_xmlrpc import Client ,WordPressPost
from wordpress_xmlrpc.methods.posts import EditPost, GetPost, GetPosts, NewPost
from wordpress_xmlrpc.methods.users import GetUserInfo

wp = Client("https://tik*****************/xmlrpc.php","t**********","**********")

wp.call(GetPosts())
wp.call(GetUserInfo())

post = WordPressPost()
t = "eklenti deneme"
a = """[python file="a.py"]"""
post.title = t
post.content = a
post.terms_names = {
"post_tag": ["test","Firstpost"],
"category": ["Introductions","Tests"]
}
sa = 1810
wp.call(EditPost(sa,post))

The code that worked 2 days ago is now giving an error, I couldn't find anywhere how to solve it. Can you help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions