importerror

python & suds “ImportError: cannot import name getLogger”

匆匆过客 提交于 2019-12-06 15:32:52
I'm using Ubuntu 11.04 (natty). I have been using Suds to consume a SOAP web service. Everything was working fine... until it wasn't. I can no longer import Suds. I've uninstalled and re-installed Suds from the Ubuntu repositories but still get the same import error (see IDLE traceback below). I'm using Python 2.7.1 and Suds 0.4.1-2. Does anyone have any ideas on how to solve this problem?? >>> import suds Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> import suds File "/usr/lib/pymodules/python2.7/suds/__init__.py", line 154, in <module> import client File "/usr

I get 'ImportError: No module named web' despite the fact that it is installed

*爱你&永不变心* 提交于 2019-12-06 15:18:50
问题 I would like to run a simple 'Hello world' app. Every time I run it I get 'ImportError: No module named web' I installed web.py using pip and using easy_install several times. I tried uninstalling it and installing again. I tried installing it a as sudo. Nothing seems to work. I use OS X Code of the application: import web urls = ( '/', 'index' ) app = web.application(urls, globals()) class index: def GET(self): greeting = "Hello World" return greeting if __name__ == "__main__": app.run() I

Trouble importing filters using skimage

五迷三道 提交于 2019-12-06 14:02:39
I have been using the Skimage package for quite a while in Python 2.7. Recently I upgrade my Ubuntu to 14.10 And now I can not import filters (used to be filter) from the Skimage package. Python 2.7.9 (default, Apr 2 2015, 15:33:21) [GCC 4.9.2] on linux2 Type "copyright", "credits" or "license()" for more information. >>> from skimage import filters Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> from skimage import filters File "/usr/local/lib/python2.7/dist-packages/skimage/filters/__init__.py", line 17, in <module> from .. import restoration File "/usr/local/lib

Calling a Python function from another file

老子叫甜甜 提交于 2019-12-06 12:46:48
This problem has confused me for days. I have two files, helpers.py and launcher.py . In helpers.py I have defined the function hello() , which prints "hello". I want to call hello() in launcher.py. This is what I wrote in launcher.py : from helpers import hello .... helpers.hello() But when I run it, I get this: from helpers import hello ImportError: No module named helpers How do I fix this? Edit in response to answers / comments I'm using OS X and Python 3.4 The two files are in the same directory I tried the two ways: from helpers import hello hello() and import helpers helpers.hello() But

ImportError: cannot import name stubs for Google App Engine GAE Init Quick Start & Tutorial

自闭症网瘾萝莉.ら 提交于 2019-12-06 11:18:41
Running into this error when trying quick start "hello" on gae-init ERROR 2017-10-04 21:16:02,378 wsgi.py:263] Traceback (most recent call last): File "/Users/anon/Desktop/Hacking/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle handler = _config_handle.add_wsgi_middleware(self._LoadHandler()) File "/Users/anon/Desktop/Hacking/google-cloud-sdk/platform/google_appengine/google/appengine/api/lib_config.py", line 351, in __getattr__ self._update_configs() File "/Users/anon/Desktop/Hacking/google-cloud-sdk/platform/google_appengine/google/appengine

Running scrapy from script (beginner)

元气小坏坏 提交于 2019-12-06 08:25:57
I am starting to get into python and yes, I have searched this site and the web for an answer, but somehow I really can't get it to run. I've created a spiderclass EbaySpider, residing in spider/ebay.py that I can start from the command line without problems (even with output to a JSON file). Now I want to start scrapy from within another .py file, so I can directly access the crawled data and output it to a GUI (will think about how to do that later). I have taken the code from this question (the askers code, as I don't need to run the spider multiple times) and added from spiders import ebay

Import error ghmm library

久未见 提交于 2019-12-06 07:41:17
问题 i get this error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/ghmm.py", line 112, in <module> import ghmmwrapper File "/usr/local/lib/python2.6/dist-packages/ghmmwrapper.py", line 25, in <module> _ghmmwrapper = swig_import_helper() File "/usr/local/lib/python2.6/dist-packages/ghmmwrapper.py", line 21, in swig_import_helper _mod = imp.load_module('_ghmmwrapper', fp, pathname, description) ImportError: libghmm.so.1: cannot

python setuptools: ImportError: cannot import name Library

假装没事ソ 提交于 2019-12-06 05:46:49
I have a Windows 7 64bit machine and want to install the python package mgrs. I have tried using both easy_install and running python setup.py install in the mgrs directory. Easy_install gives me the error below. C:\Users\farrell>easy_install mgrs Searching for mgrs Reading https://pypi.python.org/simple/mgrs/ Best match: mgrs 1.1.0 Downloading https://pypi.python.org/packages/source/m/mgrs/mgrs-1.1.0.tar.gz#md5 =96e0c00f16d86a3f8b84c2c46cb68b8e Processing mgrs-1.1.0.tar.gz Writing c:\users\farrell\appdata\local\temp\easy_install-lzqjsi\mgrs-1.1.0\setup .cfg Running mgrs-1.1.0\setup.py -q

cx_freeze ImportError when executing file

我的梦境 提交于 2019-12-06 05:17:00
The program is designed to capture the title bar of the users foreground window and append that title along with the datetime to a log file. When I run this code on my computer it works, however when I run the executable on another computer I get the error you can see below: Python file: from win32gui import GetForegroundWindow, GetWindowText from datetime import datetime from time import sleep from os.path import join log_path = r'C:\Office Viewer\OV_Log.txt' while True: window_name = GetWindowText(GetForegroundWindow()) current_time = datetime.strftime(datetime.now(), '%Y/%m/%d_%H:%M:%S, ')

Django Management Command ImportError

China☆狼群 提交于 2019-12-06 04:05:02
问题 I have problem with imported module into my qsl/management/commands/<customcommand>.py file. in fact, my app structure is : qsl/management/commands/ : dir for my management commands qsl/management/jobs/ : dir for my mangement jobs jobs are python classes that contains the job i want to be done in the coresponding command e.g: news command in qsl/management/commands/ imports news job in qsl/management/jobs/ my error when i want to execute python manage.py news is an importerror : no module