top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Error running xmlrpc Client and server under different Python versions

0 votes
51 views

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 Google+ Share Button LinkedIn Share Button Multiple Social 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 setup.py install

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

Below is the setup.py

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

setup(name="python-instagram",
 version="0.8.0",
 description="Instagram API client",
 license="MIT",
 install_requires=["simplejson","httplib2"],
 author="Instagram, Inc",
 author_email="apidevelopers@instagram.com",
 url="http://github.com/Instagram/python-instagram",
 packages = find_packages(),
 keywords= "instagram",
 zip_safe = True)
+2 votes

I have two Questions:

  1. Could Python 3.2, when compiled against OpenSSL 1.0.0j, be affected by the poodle bug? https://www.openssl.org/~bodo/ssl-poodle.pdf

  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",
 stdout=subprocess.PIPE,
 stderr=subprocess.STDOUT,
 bufsize=1,
 universal_newlines=True,
 shell=False)
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?

0 votes

This is my first time using pyinstaller. My goal is to build an .app in Mac. The app is basically a GUI written in PySide, and I have about 7 different Python scripts + 1 .png file. The main file calls 4 of the files, and the 4 files will call the rest of the 2 files repeatedly. The .png file is nothing but the window logo. Could someone help me with some diagnosis? I do not know what went wrong. I searched a lot of documentations online, i.e., change spec, add import, ... etc. but my app still doesn't run.FYI, Pyinstaller could generate an app for me, but there are two issues:
1. Icon is not changed for the app.
2. App crashes when opened.

My Python version is 2.7.5 and I am using PyInstaller-2.0. Here is my code for packaging:

python pyinstaller.py --onefile --windowed --name=MyApplication -i ~/Documents/AASource/icon.ico ~/Documents/AASource/Scripts/main_file.pyHere is the spec file:

$ -*- mode: python -*- a = Analysis(['/Users/boxuancui/Documents/AASource/Scripts/main_file.py'], pathex=['/Users/boxuancui/Documents/pyinstaller-2.0'], hiddenimports=[], hookspath=None) pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, name=os.path.join('dist', 'MyApplication'), debug=False, strip=None, upx=True, console=False , icon='/Users/boxuancui/Documents/AASource/icon.ico') app = BUNDLE(exe, name=os.path.join('dist', 'MyApplication.app'))Here is part of the crash message:

Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x00000000000054d8

Thanks in advance! Any help will be appreciated!


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#470/147, 3rd Floor, 5th Main,
HSR Layout Sector 7,
Bangalore - 560102,
Karnataka INDIA.
QUERY HOME
...