top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Error running xmlrpc Client and server under different Python versions

0 votes

I need to run xmlrpc Server under Python 3.3 and Client under Python 2.7. But when I try to do so, I receive the following exception:

":global name 'xmlrpclib' is not defined"

What is the reason for such an exception. As far as I understand xmlrpc is language independent.

posted Jun 20, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote
Best answer

Somewhere in your code you are trying to use the name xmlrpclib but it was not imported or otherwise assigned to. Search through your code to find the usage.

> What is the reason for such an exception. As far as I understand xmlrpc is language independent. Please help. 

The fact that it is language independent is irrelevant since this is a code error.

answer Jun 20, 2013 by anonymous
0 votes
answer Jun 20, 2013 by anonymous
Similar Questions
0 votes

Fedora 18

Where do I find the setuptools module ? For error below

$python install

Traceback (most recent call last):
 File "", line 2, in 
 from setuptools import setup, find_packages
ImportError: No module named setuptools

Below is the

#!/usr/bin/env python
from setuptools import setup, find_packages

 description="Instagram API client",
 author="Instagram, Inc",
 packages = find_packages(),
 keywords= "instagram",
 zip_safe = True)
0 votes

i want to sent a response for my form submit from server to client, that means python flask to javascript. My javascript code is given follows

document.addEventListener('DOMContentLoaded', function() {

chrome.tabs.getSelected(null, function(tab) {
  d = document;
  var f = d.createElement('form');
  f.action = '';
  f.method = 'post';
  var i = d.createElement('input');
  i.type = 'hidden'; = 'url';
  i.value = tab.url;
    request = new XMLHttpRequest();"POST","",true);
    request.addEventListener("readystatechange", processRequest,false);
    function processRequest(e)
    if(request.readyState==4 && request.status == 200)
    var response = JSON.parse(request.responseText);

And my Python server code is follows

from flask import Flask, flash, redirect, url_for, request, render_template,jsonify
import json
import UrlTest
import trainingSet as ts

app = Flask(__name__)

@app.route('/Get Form/',methods = ['POST'])
def GetForm():
request.method == 'POST'
print s
return str(s)

@app.route('/PutValue/',methods = ['POST'])
def PutValue():
request.method == 'POST'
print s
return jsonify(result=s)

if (__name__ == '__main__'):,host='', use_reloader=False)

I want to send the value of s to the javascript client. please help me to send this the value of s.
and if u can suggest the complete code in javascipt and python

+2 votes

I have two Questions:

  1. Could Python 3.2, when compiled against OpenSSL 1.0.0j, be affected by the poodle bug?

  2. If yes - are the following OpenSSL versions approved for use with Python 3.2:
    OpenSSL 0.9.8zf
    OpenSSL 1.0.0r
    OpenSSL 1.0.1m
    OpenSSL 1.0.2a

+1 vote

I'm using Python 2.7 under Windows and am trying to run a command line program and process the programs output as it is running. A number of web searches have indicated that the following code would work.

import subprocess

p = subprocess.Popen("D:PythonPython27Scriptspip.exe list -o",
for line in p.stdout:
 print line

When I use this code I can see that the Popen works, any code between the Popen and the for will run straight away, but as soon as it gets to the for and tries to read p.stdout the code blocks until the command
line program completes, then all of the lines are returned. Does anyone know how to get the results of the program without it blocking?