I am trying to run Pyramid with Jinja2 using new Python 2.7 runtime in threadsafe mode and GAE 1.6.0 pre-release SDK. I've made modifications to my app as outlined here, i.e. I've set runtime: python27, threadsafe: true in app.yaml and got rid of main() function. When I generate response by myself it works fine, but when I try to bring jinja2 into the equation, I get the following exception:
ERROR 2011-11-07 00:10:34,356 wsgi.py:170]
Traceback (most recent call last):
File "/gae/google/appengine/runtime/wsgi.py", line 168, in Handle
[...]
File "/myapp/source/myapp-tip/main.py", line 29, in <module>
config.include('pyramid_jinja2')
File "/myapp/source/myapp-tip/lib/dist/pyramid/config/__init__.py", line 616, in include
c(configurator)
File "lib/dist/pyramid_jinja2/__init__.py", line 390, in includeme
_get_or_build_default_environment(config.registry)
File "/lib/dist/pyramid_jinja2/__init__.py", line 217, in _get_or_build_default_environment
_setup_environment(registry)
File "/lib/dist/pyramid_jinja2/__init__.py", line 253, in _setup_environment
package = _caller_package(('pyramid_jinja2', 'jinja2', 'pyramid.config'))
File "/lib/dist/pyramid_jinja2/__init__.py", line 136, in caller_package
for t in self.inspect.stack():
File "/usr/lib/python2.7/inspect.py", line 1056, in stack
return getouterframes(sys._getframe(1), context)
File "/usr/lib/python2.7/inspect.py", line 1034, in getouterframes
framelist.append((frame,) + getframeinfo(frame, context))
File "/usr/lib/python2.7/inspect.py", line 1009, in getframeinfo
lines, lnum = findsource(frame)
File "/usr/lib/python2.7/inspect.py", line 534, in findsource
module = getmodule(object, file)
File "/usr/lib/python2.7/inspect.py", line 506, in getmodule
main = sys.modules['__main__']
KeyError: '__main__'
I tried to mess around a bit with pyramid_jinja2 code to work around this issue, only to be left with another exception:
ERROR 2011-11-04 12:06:38,720 wsgi.py:170]
Traceback (most recent call last):
File "/gae/google/appengine/runtime/wsgi.py", line 168, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
[...]
File "/myapp/source/myapp-tip/main.py", line 29, in <module>
config.add_jinja2_search_path("templates")
File "/myapp/source/myapp-tip/lib/dist/pyramid/config/util.py", line 28, in wrapper
result = wrapped(self, *arg, **kw)
File "/lib/dist/pyramid_jinja2/__init__.py", line 311, in add_jinja2_search_path
env.loader.searchpath.append(abspath_from_resource_spec(d))
File "/myapp/source/myapp-tip/lib/dist/pyramid/asset.py", line 38, in abspath_from_asset_spec
return pkg_resources.resource_filename(pname, filename)
File "/myapp/source/myapp-tip/pkg_resources.py", line 840, in resource_filename
return get_provider(package_or_requirement).get_resource_filename(
File "/myapp/source/myapp-tip/pkg_resources.py", line 160, in get_provider
__import__(moduleOrReq)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 640, in Decorate
return func(self, *args, **kwargs)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 1756, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 640, in Decorate
return func(self, *args, **kwargs)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 1628, in FindAndLoadModule
description)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 640, in Decorate
return func(self, *args, **kwargs)
File "/gae/google/appengine/tools/dev_appserver_import_hook.py", line 1571, in LoadModuleRestricted
description)
ImportError: Cannot re-init internal module __main__
I'd be happy if anybody could shed some light on what pyramid is trying to do under the hood. Judging by the latter stack trace it seems it's trying to resolve an asset, but why is it trying to reload __main__? I'm not even sure my problem is caused by pyramid or GAE.
Thanks for any insight on this issue.
I'm not familiar with pyramid, but the problem really does seem to be with this line:
config.include('pyramid_jinja2')
Whatever that config thing is, it seems to be doing some dynamic import magic.
Don't do that.
The app engine environment doesn't handle imports the way you would in normal python. Step through that line with a debugger and you'll wind up in the replacement version of the import system, which you'll soon see, only implements a small part of what real python does.
If possible, just use a normal import statement... Otherwise, you're going to have to dig into config.include and get it to play nice with the restricted importing features on GAE.
I managed to make it work using Pyramid 1.3's AssetResolver. First attempt is here. Just not sure what the lifetime/scope of the resolver should be in this case, I will figure it out later.
In pyramid_jinja2/__init__.py add the following code before _get_or_build_default_environment()
class VirtualModule(object):
def __init__(self,name):
import sys
sys.modules[name]=self
def __getattr__(self,name):
return globals()[name]
VirtualModule("__main__")
def _get_or_build_default_environment(registry):
(http://www.inductiveautomation.com/forum/viewtopic.php?f=70&p=36917)
Related
I'm trying to build a python function with web.py and SQLite that will allow users to search for a given string within a description field and will return all matching results.
Right now I've gotten to the below function, which works but only if the input is an exact match.
def getItem(params, max_display):
query_string = 'SELECT * FROM items WHERE 1=1'
description = params['description']
if params['description']:
query_string = query_string + ' AND description LIKE $description'
result = query(query_string, {
'description': params['description']
I've tried to implement this feature with LIKE "%$description%"' , however I keep getting the below web.py error.
Traceback (most recent call last):
File "lib/web/wsgiserver/__init__.py", line 1245, in communicate
req.respond()
File "lib/web/wsgiserver/__init__.py", line 775, in respond
self.server.gateway(self).respond()
File "lib/web/wsgiserver/__init__.py", line 2018, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "lib/web/httpserver.py", line 306, in __call__
return self.app(environ, xstart_response)
File "lib/web/httpserver.py", line 274, in __call__
return self.app(environ, start_response)
File "lib/web/application.py", line 279, in wsgi
result = self.handle_with_processors()
File "lib/web/application.py", line 249, in handle_with_processors
return process(self.processors)
File "lib/web/application.py", line 246, in process
raise self.internalerror()
File "lib/web/application.py", line 478, in internalerror
return debugerror.debugerror()
File "lib/web/debugerror.py", line 305, in debugerror
return web._InternalError(djangoerror())
File "lib/web/debugerror.py", line 290, in djangoerror
djangoerror_r = Template(djangoerror_t, filename=__file__, filter=websafe)
File "lib/web/template.py", line 846, in __init__
code = self.compile_template(text, filename)
File "lib/web/template.py", line 926, in compile_template
ast = compiler.parse(code)
File "/Users/sokeefe/homebrew/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 51, in parse
return Transformer().parsesuite(buf)
File "/Users/sokeefe/homebrew/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py", line 128, in parsesuite
return self.transform(parser.suite(text))
AttributeError: 'module' object has no attribute 'suite'
Any thoughts on what might be going wrong with this function?
Thanks in advance!
What do you think is going on with parser.py?
Here is the relevant portion of the error message:
File
"/Users/sokeefe/homebrew/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/compiler/transformer.py",
line 128, in parsesuite
return self.transform(parser.suite(text)) AttributeError: 'module' object has no attribute 'suite'
So, somewhere there is a file called parser.py, which defines a function called suite(), which is used by some library code that executes when your program executes. But because you named one of your files parser.py, when the library code executes, python searches for a file named parser.py, and python found your file first, and there was no function named suite() in your file.
I'm running on Windows 7 x64. I followed the install documentation on Buildbot and did some research on the issue I'm having and haven't found a solution yet. When I do a force build, everything works fine. I'm using GitPoller. When it tries to poll for changes, an exception is thrown; why? Let me know if I can supply any more information. Here's what I'm getting on the master's twistd.log every 5 minutes:
2014-10-09 00:19:53-0700 [-] while polling for changes
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\buildbot-0.8.9-py2.7.egg\buildbot\util\misc.py", line 54, in start
d = self.method()
File "C:\Python27\lib\site-packages\buildbot-0.8.9-py2.7.egg\buildbot\changes\base.py", line 70, in doPoll
d = defer.maybeDeferred(self.poll)
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 139, in maybeDeferred
result = f(*args, **kw)
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 1237, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 1099, in _inlineCallbacks
result = g.send(result)
File "C:\Python27\lib\site-packages\buildbot-0.8.9-py2.7.egg\buildbot\changes\gitpoller.py", line 147, in poll
yield self._dovccmd('init', ['--bare', self.workdir])
File "C:\Python27\lib\site-packages\buildbot-0.8.9-py2.7.egg\buildbot\changes\gitpoller.py", line 292, in _dovccmd
[command] + args, path=path, env=os.environ)
File "C:\Python27\lib\site-packages\twisted\internet\utils.py", line 176, in getProcessOutputAndValue
reactor)
File "C:\Python27\lib\site-packages\twisted\internet\utils.py", line 30, in _callProtocolWithDeferred
reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
File "C:\Python27\lib\site-packages\twisted\internet\posixbase.py", line 358, in spawnProcess
return Process(self, processProtocol, executable, args, env, path)
File "C:\Python27\lib\site-packages\twisted\internet\_dumbwin32proc.py", line 195, in __init__
raise OSError(pwte)
exceptions.OSError: (2, 'CreateProcess', 'The system cannot find the file specified.')
Also, here's the relevant portion of my config file:
from buildbot.changes.gitpoller import GitPoller
c['change_source'] = []
c['change_source'].append(GitPoller(
repourl='https://github.com/solstice333/BuildbotTest.git',
branch='master',
pollinterval=300))
Any ideas?
I have similar issue with HgPoller. Try to specify full path to git
c['change_source'].append(GitPoller(
gitbin='full/path/to/git.exe',
repourl='https://github.com/solstice333/BuildbotTest.git',
branch='master',
pollinterval=300))
I think something wrong with twisted - this dont work with same error
PS Twisted use win32process.CreateProcess and MSDN says about it first argument: The string can specify the full path and file name of the module to execute or it can specify a partial name. In the case of a partial name, the function uses the current drive and current directory to complete the specification. The function will not use the search path.
from twisted.internet import utils
utils.getProcessOutputAndValue("hg.exe", ['init', "test_dir"])
I am using Sphinx to automatically build docs for a project I am working on. The docs were building fine, until I added another class to one of the modules. Now whenever I try to run the build, the new class is not imported.
The error from the Sphinx error log:
# Sphinx version: 1.2b3
# Python version: 2.7.3
# Docutils version: 0.9 release
# Jinja2 version: 2.6
# Loaded extensions:
# sphinxcontrib.httpdomain from C:\Python27\lib\site-packages\sphinxcontrib_httpdomain-1.2.1-py2.7.egg\sphinxcontrib\httpdomain.pyc
# sphinxcontrib.autohttp.flask from C:\Python27\lib\site-packages\sphinxcontrib_httpdomain-1.2.1-py2.7.egg\sphinxcontrib\autohttp\flask.pyc
# sphinx.ext.autodoc from C:\Python27\lib\site-packages\sphinx\ext\autodoc.pyc
# sphinx.ext.viewcode from C:\Python27\lib\site-packages\sphinx\ext\viewcode.pyc
# sphinx.ext.oldcmarkup from C:\Python27\lib\site-packages\sphinx\ext\oldcmarkup.pyc
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\sphinx\cmdline.py", line 246, in main
app.build(force_all, filenames)
File "C:\Python27\lib\site-packages\sphinx\application.py", line 212, in build
self.builder.build_update()
File "C:\Python27\lib\site-packages\sphinx\builders\__init__.py", line 214, in build_update
'out of date' % len(to_build))
File "C:\Python27\lib\site-packages\sphinx\builders\__init__.py", line 234, in build
purple, length):
File "C:\Python27\lib\site-packages\sphinx\builders\__init__.py", line 134, in status_iterator
for item in iterable:
File "C:\Python27\lib\site-packages\sphinx\environment.py", line 470, in update_generator
self.read_doc(docname, app=app)
File "C:\Python27\lib\site-packages\sphinx\environment.py", line 618, in read_doc
pub.publish()
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\core.py", line 221, in publish
self.settings)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\readers\__init__.py", line 69, in read
self.parse()
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\readers\__init__.py", line 75, in parse
self.parser.parse(self.input, document)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\__init__.py", line 162, in parse
self.statemachine.run(inputlines, document, inliner=self.inliner)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 174, in run
input_source=document['source'])
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 239, in run
context, state, transitions)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2706, in underline
self.section(title, source, style, lineno - 1, messages)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 331, in section
self.new_subsection(title, lineno, messages)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 399, in new_subsection
node=section_node, match_titles=True)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 286, in nested_parse
node=node, match_titles=match_titles)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 199, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 239, in run
context, state, transitions)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2706, in underline
self.section(title, source, style, lineno - 1, messages)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 331, in section
self.new_subsection(title, lineno, messages)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 399, in new_subsection
node=section_node, match_titles=True)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 286, in nested_parse
node=node, match_titles=match_titles)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 199, in run
results = StateMachineWS.run(self, input_lines, input_offset)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 239, in run
context, state, transitions)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\statemachine.py", line 460, in check_line
return method(match, context, next_state)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2279, in explicit_markup
nodelist, blank_finish = self.explicit_construct(match)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2291, in explicit_construct
return method(self, expmatch)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2034, in directive
directive_class, match, type_name, option_presets)
File "C:\Python27\lib\site-packages\docutils-0.9-py2.7.egg\docutils\parsers\rst\states.py", line 2083, in run_directive
result = directive_instance.run()
File "C:\Python27\lib\site-packages\sphinxcontrib_httpdomain-1.2.1-py2.7.egg\sphinxcontrib\autohttp\flask.py", line 138, in run
for line in self.make_rst():
File "C:\Python27\lib\site-packages\sphinxcontrib_httpdomain-1.2.1-py2.7.egg\sphinxcontrib\autohttp\flask.py", line 97, in make_rst
app = import_object(self.arguments[0])
File "C:\Python27\lib\site-packages\sphinxcontrib_httpdomain-1.2.1-py2.7.egg\sphinxcontrib\autohttp\common.py", line 17, in import_object
mod = __import__(module_name)
File "E:\workspace_zach\API\api_serve.py", line 6, in <module>
from BOBI import BOBI
File "E:\workspace_zach\API\BOBI\__init__.py", line 13, in <module>
from Lib.DBVersionTools import DBVersionNormalizer, DBVersionPolisher
ImportError: cannot import name DBVersionPolisher
The module is on the path, and is within a folder with an __init__.py file. Sphinx is clearly able to import the first class, but not the second. Tests involving both classes work fine. I have deleted all of the old .pyc files, but that failed to resolve the issue. If I remove the second class from the import statement and comment out references to it, then the docs work without a problem.
Any ideas on how to fix this issue, or failing that hide the import statements from sphinx (but not other scripts, like my tests)?
Additional code:
All import statements:
import Error
import logging
import re
import Lib.globals as Globals
from flask import Blueprint, jsonify, request, current_app, make_response
from functools import update_wrapper
from datetime import timedelta
from Lib.VerifyCookie import verify, req_to_dict
from Lib.MSSQLTools import MSSQLTools
from Lib.DBVersionTools import DBVersionNormalizer, DBVersionPolisher
Sphinx extensions and path modifications:
sys.path.append('E:\\workspace_zach\\API') # Root directory for the project
extensions = [
'sphinx.ext.autodoc',
'sphinxcontrib.httpdomain',
'sphinxcontrib.autohttp.flask',
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
]
A previous version of the file, without the modifications being imported, existed on another path of the computer I was developing on, and had been added to the pythonpath.
sys.path.remove('E:\\workspace\\API') was sufficient to remove the other path and fix the problem.
I was trying to install a module for opencv and added an opencv.pth file to the folder beyond my sites.py file. I have since deleted it and no change.
When I try to run help('modules'), I get the following error:
Please wait a moment while I gather a
list of all available modules...
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/twisted/words/im/init.py:8:
UserWarning: twisted.im will be
undergoing a rewrite at some point in
the future.
warnings.warn("twisted.im will be
undergoing a rewrite at some point in
the future.")
/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py:110:
DeprecationWarning: The wxPython
compatibility package is no longer
automatically generated or actively
maintained. Please switch to the wx
package as soon as possible.
import(name) Traceback (most recent call last): File "",
line 1, in File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site.py",
line 348, in call
return pydoc.help(*args, **kwds) File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py",
line 1644, in call
self.help(request) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py",
line 1681, in help
elif request == 'modules': self.listmodules() File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py",
line 1802, in listmodules
ModuleScanner().run(callback) File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pydoc.py",
line 1853, in run
for importer, modname, ispkg in pkgutil.walk_packages(): File
"/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/pkgutil.py",
line 110, in walk_packages
import(name) File "/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py",
line 180, in import_hook File
"/Library/Python/2.5/site-packages/ctypes_opencv/init.py",
line 19, in
from ctypes_opencv.cv import * File
"/BinaryCache/wxWidgets/wxWidgets-11~262/Root/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/wxaddons/init.py",
line 180, in import_hook File
"/Library/Python/2.5/site-packages/ctypes_opencv/cv.py",
line 2567, in ('desc', CvMat_r, 1), # CvMat* desc File
"/Library/Python/2.5/site-packages/ctypes_opencv/cxcore.py",
line 114, in cfunc
return CFUNCTYPE(result, *atypes)((name, dll), tuple(aflags)) AttributeError: dlsym(0x2674d10, cvCreateFeatureTree): symbol not found
What gives?!
This happens because help('modules') imports all modules, which can result in a lot of unsentineled code being executed. There's nothing you can do short of reporting bugs in every single package that causes this (opencv in this case) and wait for them to fix it.
I write a program :
from PyQt4.QtCore import *
from PyQt4.QtGui import *
def main():
app = QApplication([])
button = QPushButton("hello?")
button.show()
app.exec_()
if __name__=="__main__":
main()
the file name is t.py,
when I run:
pylint t.py
in ubuntu9.10, pyqt4,
I got this:
pylint t.py
No config file found, using default configuration
error while building astng for /home/halida/data/workspace/test/t.py
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 126, in astng_from_file
astng = ASTNGBuilder(self).file_build(filepath, modname)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 118, in file_build
node = self.string_build(data, modname, path)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 128, in string_build
return self.ast_build(parse(data + '\n'), modname, path)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 147, in ast_build
self.rebuilder.walk(node)
File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 89, in walk
self._walk(node)
File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 109, in _walk
self._walk(child, node)
File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 103, in _walk
handle_leave = node.accept(self)
File "/usr/lib/pymodules/python2.6/logilab/astng/nodes.py", line 159, in accept
return func(self)
File "/usr/lib/pymodules/python2.6/logilab/astng/rebuilder.py", line 188, in visit_from
imported = node.root().import_module(node.modname)
File "/usr/lib/pymodules/python2.6/logilab/astng/scoped_nodes.py", line 282, in import_module
return MANAGER.astng_from_module_name(self.relative_name(modname, level))
File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 172, in astng_from_module_name
return self.astng_from_module(module, modname)
File "/usr/lib/pymodules/python2.6/logilab/astng/manager.py", line 207, in astng_from_module
astng = ASTNGBuilder(self).module_build(module, modname)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 80, in module_build
node = self.inspect_build(module, modname=modname, path=path)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 95, in inspect_build
self.object_build(node, module)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 195, in object_build
self.object_build(class_node, member)
File "/usr/lib/pymodules/python2.6/logilab/astng/builder.py", line 198, in object_build
object_build_methoddescriptor(node, member)
File "/usr/lib/pymodules/python2.6/logilab/astng/raw_building.py", line 150, in object_build_methoddescriptor
func = build_function(member.__name__, doc=member.__doc__)
AttributeError: 'PyQt4.QtCore.pyqtSignal' object has no attribute '__name__'
************* Module t
F: 1: <class 'logilab.astng._exceptions.ASTNGBuildingException'>: Unable to load module t ('PyQt4.QtCore.pyqtSignal' object has no attribute '__name__')
Compilation exited abnormally with code 1 at Sat Dec 26 10:43:54
in windows XP, with pythonxy,
I only got a error message, why?
Looks like a bug in astng. They try to read the name of a function which does not publish it (native extension func). I'd report a bug to both astng and pyqt projects. The first one would be that they should handle a no-name situation better. The second one would be that every sane extension should publish at least the function names.
I would check if you're using the very latest astng, pylint, etc.