Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6179937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:45:24+00:00 2026-05-24T00:45:24+00:00

in py2 there was rv = xmlrpc.pastes.newPaste(language, code, None, filename, mimetype, private) I’m getting

  • 0

in py2 there was

rv = xmlrpc.pastes.newPaste(language, code, None, filename, mimetype, private)

I’m getting error : expected an object with the buffer interface

Can’t find any docs about xmlrpc and py3. I found only this snippet :

p1 = subprocess.Popen(['gpg','--clearsign'], stdin = subprocess.PIPE, stdout=subprocess.PIPE)
p1.stdin.write(bytes(input, 'UTF8'))
output = p1.communicate()[0]

s = ServerProxy('http://paste.pocoo.org/xmlrpc/')
pasteid = s.pastes.newPaste('text',output.decode())
print ("http://paste.pocoo.org/raw/",pasteid,"/", sep="")

but I’m still being confused about it… my version used many arguments, where can I find full description of it / fix for it ?

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:45:25+00:00Added an answer on May 24, 2026 at 12:45 am

    That error message usually means it’s looking for str (which is Unicode in Python 3), not bytes . Like in the example, you’ll need to decode the argument which is in bytes. Maybe:

    rv = xmlrpc.pastes.newPaste(language, code.decode(), None, filename, mimetype, private)
    

    But it’s hard to tell what the problem is without seeing your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I'm trying get method from remote webservice it gives me error. My code
Trying to run z3c.form.testing based code on Plone 4.1 and getting this exception Traceback
I pulled the latest code using git today and I got the following error:
had try python 2.7.3 & 3.x, both fail. error2 with py2.7 E:\Workspace\Code\SmartDoor>python Python 2.7.3
$ python bootstrap.py Downloading http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg Download error: [Errno 110] Connection timed out -- Some
In py2.6+, the multiprocessing module offers a Pool class, so one can do: class
I'd like to do regexp searches based on a variable's value. In Py2.x this
After 3.3 -> 4.1 migration I get exception on the resulting page File /fast/buildout-cache/eggs/plone.app.viewletmanager-2.0.2-py2.6.egg/plone/app/viewletmanager/manager.py,
I copied a Django directory named 'politifact' to 'politifact_omniture-1.0' to test new analytics code.
Is there something similar to the Python utility virtualenv ? Basically it allows you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.