Zope 2: How to properly "browser:page" to make a page available everywhere? - zope

Let's assume I have a sample application with following classes:
##
## impelementation/SampleApp.py
##
class SampleApp: # inherits from required classes
""" """
implements(ISampleApp)
# ...
index_html = PageTemplateFile('templates/index.pt')
##
## implementation/SampleAppUser.py
##
class SampleAppUser: # inherits from required classes
""" """
implements(ISampleAppUser)
# ...
index_html = PageTemplateFile('templates/user_index.pt')
manage_addSampleAppUserForm = PageTemplateFile('manage_addSampleUserUserForm.pt')
Now I'd like to able to link to sign-in form (manage_addSampleUserUserForm.pt) from anywhere in the application, including its index page (index.pt).
I've tried the following approach but it doesn't work:
index.pt:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns="http://xml.zope.org/namespaces/tal">
<head><title>SampleApp</title></head>
<body>
<h2>Title</h2><hr/>
<a href="#" title="Sign In"
tal:attributes="href here/signin.html">Sign In</a>
</body>
</html>
configure.zcml:
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:browser="http://namespaces.zope.org/browser">
<five:registerPackage package="." initialize=".initialize" />
<browser:page
name="signin.html"
class="bahmanm.sampleapp.implementation.SampleAppUser.SampleAppUser"
template="templates/manage_addSampleUserForm.pt"
permission="zope.Public"
/>
</configure>
During instance startup, Zope complains:
ZopeXMLConfigurationError: File "/home/bahman/sampleapp/sampleapp.devistan/src/bahmanm/sampleapp/configure.zcml", line 10.2-15.5
TypeError: page() takes at least 4 arguments (5 given)
I also tried adding for="*" but Zope poped up the following error when navigating to the application index page:
2013-01-08 15:43:26 ERROR Zope.SiteErrorLog 1357647206.080.27220840385 http://localhost:8080/sampleapp/index_html
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module Shared.DC.Scripts.Bindings, line 322, in __call__
Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
Module Products.PageTemplates.PageTemplateFile, line 130, in _exec
Module Products.PageTemplates.PageTemplate, line 79, in pt_render
Module zope.pagetemplate.pagetemplate, line 113, in pt_render
Module zope.tal.talinterpreter, line 271, in __call__
Module zope.tal.talinterpreter, line 343, in interpret
Module zope.tal.talinterpreter, line 405, in do_startTag
Module zope.tal.talinterpreter, line 482, in attrAction_tal
Module Products.PageTemplates.Expressions, line 225, in evaluateText
Module zope.tales.tales, line 696, in evaluate
- URL: index_html
- Line 7, Column 3
- Expression: <PathExpr standard:'here/signin.html'>
- Names:
{'container': <SampleApp at /sampleapp>,
'context': <SampleApp at /sampleapp>,
'default': <object object at 0x7fa1499cf4c0>,
'here': <SampleApp at /sampleapp>,
'loop': {},
'nothing': None,
'options': {'args': ()},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7fa134030ba8>,
'request': <HTTPRequest, URL=http://localhost:8080/sampleapp/index_html>,
'root': <Application at >,
'template': <PageTemplateFile at /sampleapp/index>,
'user': <User 'admin'>}
Module zope.tales.expressions, line 217, in __call__
Module Products.PageTemplates.Expressions, line 147, in _eval
Module zope.tales.expressions, line 124, in _eval
Module Products.PageTemplates.Expressions, line 74, in boboAwareZopeTraverse
Module OFS.Traversable, line 317, in restrictedTraverse
Module OFS.Traversable, line 275, in unrestrictedTraverse
- __traceback_info__: ([], 'signin.html')
Module zope.component._api, line 120, in queryMultiAdapter
Module zope.component.registry, line 238, in queryMultiAdapter
Module zope.interface.adapter, line 532, in queryMultiAdapter
TypeError: __init__() takes at most 2 arguments (3 given)
What am I doing wrong? To be honest, I believe I'm doing many things wrong :-) as I'm just blind-shooting by reading Zope 3 apidoc and reading other products' code (like SilvaForum).
I'd really appreciate any hint/help. TIA,

Browser pages are separate components altogether. They are not part of the target content type but a separate component altogether.
If all you need is a template (no view), just omit the class directive altogether:
<browser:page
name="signin.html"
for="*"
template="templates/manage_addSampleUserForm.pt"
permission="zope.Public"
/>
There is no need to create a PageTemplateFile instance manually for that.
It is not entirely clear what you want to do with your link in your template. `here/signin.html" does not look like a valid TALES expression. In plain Zope there are no easy tools to generate absolute URLs relative to a site root; perhaps you just want /signin.html and not use a TAL expression?

Related

Django tests pass locally but not on Github Actions push

My tests pass locally and in fact on Github Actions it also says "ran 8 tests" and then "OK" (and I have 8). However, the test stage fails due to a strange error in the traceback.
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 421, in execute
return Database.Cursor.execute(self, query)
sqlite3.OperationalError: near "SCHEMA": syntax error
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/runner/work/store/store/manage.py", line 22, in <module>
main()
File "/home/runner/work/store/store/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/commands/test.py", line 23, in run_from_argv
super().run_from_argv(argv)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/core/management/commands/test.py", line 55, in handle
failures = test_runner.run_tests(test_labels)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/test/runner.py", line 736, in run_tests
self.teardown_databases(old_config)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django_heroku/core.py", line 41, in teardown_databases
self._wipe_tables(connection)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django_heroku/core.py", line 26, in _wipe_tables
cursor.execute(
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/utils.py", line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute
return self.cursor.execute(sql, params)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/utils.py", line 90, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/utils.py", line 82, in _execute
return self.cursor.execute(sql)
File "/opt/hostedtoolcache/Python/3.9.9/x64/lib/python3.9/site-packages/django/db/backends/sqlite3/base.py", line 421, in execute
return Database.Cursor.execute(self, query)
django.db.utils.OperationalError: near "SCHEMA": syntax error
Error: Process completed with exit code 1.
These are all just default Django files and I haven't messed with any of them. I don't really know what to do about it and internet searches yield nothing helpful.
Just had the same issue. For me I had django_heroku in my project settings.py. It looks like, based on the comments that your app is using this.
I had something like this in settings.py:
import django_heroku
django_heroku.settings(locals())
change to the following so it doesn't use django_heroku on github actions:
if os.environ.get('ENVIRONMENT') != 'github':
import django_heroku
django_heroku.settings(locals())
and then declare an environment variable in the workflow file, I have this:
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7, 3.8, 3.9, '3.10']
env:
DJANGO_SECRET_KEY: "someKey"
ENVIRONMENT: github
Note: this is assuming you have environment variables setup. I know there are different ways of doing it, so depending on how they are setup you might have to change how they are accessed
more info here
edit:
As per the comments, you don't have to declare an additional environment variable because github has a default variable called GITHUB_ACTIONS
so you can do
if os.environ.get('GITHUB_ACTIONS') != 'true':
import django_heroku
django_heroku.settings(locals())

Unable to load web page with seleniumwire

Unable to load the web page using seleniumwire, I am observing this error in the browser.
This page isn't working
xxx.xyz didn't send any data.
ERR_EMPTY_RESPONSE
When I replace seleniumwire with selenium while initializing the webdriver, the issue is no longer observed.
Seleniumwire was working fine and the below-mentioned error started occurring a couple of days ago.
Seleniumwire version: 4.4.0
Python 3.9
MacOS Big Sur
AttributeError: module 'lib' has no attribute 'SSL_CTX_get0_param'
ERROR:seleniumwire.server:127.0.0.1:61095: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/server.py",
line 113, in handle root_layer() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/modes/http_proxy.py",
line 9, in call layer() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/tls.py",
line 285, in call layer() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/http1.py",
line 100, in call layer() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/http.py",
line 206, in call if not self._process_flow(flow): File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/http.py",
line 285, in _process_flow return self.handle_regular_connect(f) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/http.py",
line 224, in handle_regular_connect layer() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/tls.py",
line 278, in call self._establish_tls_with_client_and_server() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/tls.py",
line 358, in _establish_tls_with_client_and_server self._establish_tls_with_server() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/server/protocol/tls.py",
line 445, in _establish_tls_with_server self.server_conn.establish_tls( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/connections.py",
line 295, in establish_tls self.convert_to_tls(cert=client_cert, sni=sni, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/net/tcp.py",
line 382, in convert_to_tls context = tls.create_client_context( File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/seleniumwire/thirdparty/mitmproxy/net/tls.py",
line 285, in create_client_context param = SSL._lib.SSL_CTX_get0_param(context._context)
AttributeError: module 'lib' has no attribute 'SSL_CTX_get0_param'
This looks like you are using an outdated version of the cryptography library.

Check that `name_expressions` is iterable

When trying out the new jitify support planned for CuPy v9.x, I found that the name_expressions named argument to cupy.RawModule needs to be iterable for the NVRTC to not fail when later calling get_function. Question stemming out of cupy.RawModule using name_expressions and nvcc and/or path.
def mykernel():
grid = (...)
blocks = (...)
args = (...)
with open('my_cuda_cpp_code.cu') as f:
code = f.read()
kers = ('nameofkernel')
mod = cp.RawModule(code=code, jitify=True, name_expressions=kers, ...)
mod.get_function('nameofkernel')(grid, block, args)
The code above produces the following error output:
Traceback (most recent call last):
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 586, in compile
nvrtc.compileProgram(self.ptr, options)
File "cupy_backends/cuda/libs/nvrtc.pyx", line 108, in cupy_backends.cuda.libs.nvrtc.compileProgram
File "cupy_backends/cuda/libs/nvrtc.pyx", line 120, in cupy_backends.cuda.libs.nvrtc.compileProgram
File "cupy_backends/cuda/libs/nvrtc.pyx", line 58, in cupy_backends.cuda.libs.nvrtc.check_status
cupy_backends.cuda.libs.nvrtc.NVRTCError: NVRTC_ERROR_COMPILATION (6)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./jitify_test.py", line 62, in <module>
test_mykernel()
File "./jitify_test.py", line 57, in test_mykernel
mykernel(x_out, x_in)
File "./jitify_test.py", line 50, in mykernel
mod.get_function('nameofkernel')(grid, block, args)
File "cupy/core/raw.pyx", line 470, in cupy.core.raw.RawModule.get_function
File "cupy/core/raw.pyx", line 394, in cupy.core.raw.RawModule.module.__get__
File "cupy/core/raw.pyx", line 402, in cupy.core.raw.RawModule._module
File "cupy/_util.pyx", line 53, in cupy._util.memoize.decorator.ret
File "cupy/core/raw.pyx", line 547, in cupy.core.raw._get_raw_module
File "cupy/core/core.pyx", line 1829, in cupy.core.core.compile_with_cache
File "cupy/core/core.pyx", line 1883, in cupy.core.core.compile_with_cache
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 393, in compile_with_cache
return _compile_with_cache_cuda(
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 472, in _compile_with_cache_cuda
ptx, mapping = compile_using_nvrtc(
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 229, in compile_using_nvrtc
return _compile(source, options, cu_path,
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 213, in _compile
ptx, mapping = prog.compile(options, log_stream)
File "/home/mikaeltw/env/lib/python3.8/site-packages/cupy/cuda/compiler.py", line 597, in compile
raise CompileException(log, self.src, self.name, options,
cupy.cuda.compiler.CompileException: __nv_name_map(2): error: expected an expression
__nv_name_map(2): error: Error in parsing name expression for lowered name lookup. Input name expression was: " :"
__nv_name_map(3): error: identifier "_" is undefined
--||--
Setting kers to an iterable, e.g. ['nameofkernel'] or ('nameofkernel',) and it works.
According to the docs https://docs.cupy.dev/en/stable/reference/generated/cupy.RawModule.html, the name_expressions should be given as a sequence of strings. My suggestion is to check that name_expressions is iterable (not just a single str, even though str is iterable), to catch an otherwise cryptic error when calling get_function.
Well, first of all, we did say it's a sequence (ex: list/tuple) of strings and gave an example in the doc page you quoted:
name_expressions (sequence of str) – A sequence (e.g. list) of strings referring to the names of C++ global/template kernels. For example, name_expressions=['func1<int>', 'func1<double>', 'func2'] for the template kernel func1<T> and non-template kernel func2. Strings in this tuple must then be passed, one at a time, to get_function() to retrieve the corresponding kernel.
So I don't see any ambiguity. There is no doubt that it's such a common pitfall in Python to write ('abc') and thinking it's a 1-element tuple containing the string 'abc', for which it should been written as ('abc',) with comma. But checking for such pitfall everywhere in the codebase would be a pain in the ass IMHO.
Second, even if we add a check to ensure the input is iterable, it still doesn't solve your issue as strings are also iterable/sequence:
>>> import collections.abc
>>> isinstance((1,2), collections.abc.Iterable)
True
>>> isinstance((1,2), collections.abc.Sequence)
True
>>> isinstance('abc', collections.abc.Iterable)
True
>>> isinstance('abc', collections.abc.Sequence)
True
So there is no good way to enforce this check other than checking it explicitly via isinstance(name_expressions, str), which circles back to the pain I mentioned above.

Scrapyd-Deploy: SPIDER_MODULES not found

I am trying to deploy a scrapy 2.1.0 project with scrapy-deploy 1.2 and get this error:
scrapyd-deploy example
/Library/Frameworks/Python.framework/Versions/3.8/bin/scrapyd-deploy:23: ScrapyDeprecationWarning: Module `scrapy.utils.http` is deprecated, Please import from `w3lib.http` instead.
from scrapy.utils.http import basic_auth_header
fatal: No names found, cannot describe anything.
Packing version r1-master
Deploying to project "crawler" in http://myip:6843/addversion.json
Server response (200):
{"node_name": "spider1", "status": "error", "message": "/usr/local/lib/python3.8/dist-packages/scrapy/utils/project.py:90: ScrapyDeprecationWarning: Use of environment variables prefixed with SCRAPY_ to override settings is deprecated. The following environment variables are currently defined: EGG_VERSION\n warnings.warn(\nTraceback (most recent call last):\n File \"/usr/lib/python3.8/runpy.py\", line 193, in _run_module_as_main\n return _run_code(code, main_globals, None,\n File \"/usr/lib/python3.8/runpy.py\", line 86, in _run_code\n exec(code, run_globals)\n File \"/usr/local/lib/python3.8/dist-packages/scrapyd/runner.py\", line 40, in <module>\n main()\n File \"/usr/local/lib/python3.8/dist-packages/scrapyd/runner.py\", line 37, in main\n execute()\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/cmdline.py\", line 142, in execute\n cmd.crawler_process = CrawlerProcess(settings)\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/crawler.py\", line 280, in __init__\n super(CrawlerProcess, self).__init__(settings)\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/crawler.py\", line 152, in __init__\n self.spider_loader = self._get_spider_loader(settings)\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/crawler.py\", line 146, in _get_spider_loader\n return loader_cls.from_settings(settings.frozencopy())\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/spiderloader.py\", line 60, in from_settings\n return cls(settings)\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/spiderloader.py\", line 24, in __init__\n self._load_all_spiders()\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/spiderloader.py\", line 46, in _load_all_spiders\n for module in walk_modules(name):\n File \"/usr/local/lib/python3.8/dist-packages/scrapy/utils/misc.py\", line 69, in walk_modules\n mod = import_module(path)\n File \"/usr/lib/python3.8/importlib/__init__.py\", line 127, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n File \"<frozen importlib._bootstrap>\", line 1014, in _gcd_import\n File \"<frozen importlib._bootstrap>\", line 991, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 973, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'crawler.spiders_prod'\n"}
crawler.spiders_prod is the first module defined in SPIDER_MODULES
Part of crawler.settings.py:
SPIDER_MODULES = ['crawler.spiders_prod', 'crawler.spiders_dev']
NEWSPIDER_MODULE = 'crawler.spiders_dev'
The crawler works localy, but using deploy it will fail to use whatever I call the folder where my spiders live in.
scrapyd-deploy setup.py:
# Automatically created by: scrapyd-deploy
from setuptools import setup, find_packages
setup(
name = 'project',
version = '1.0',
packages = find_packages(),
entry_points = {'scrapy': ['settings = crawler.settings']},
)
scrapy.cfg:
[deploy:example]
url = http://myip:6843/
username = test
password = whatever.
project = crawler
version = GIT
Is this possibly a bug or am I missing something?
Modules have to be initialised within scrapy. This happens through simply placing the following file into each folder defined as a module:
__init__.py
This has solved my described problem.
Learning:
If you want to split your spiders into folders, it is not enough to simple create a folder and specify this folder as a module within the settings file, but you also need to place this file into the new folder. Funny engough the crawler works, without the file just deployment to scrapyd fails.

Using python-rq with Zope

I'm trying to use Python-RQ with Zope by calling an external method (for background tasks) from ZMI after a certain operation. The file called by external method resides in Extensions. It initialises connection to Redis and imports a module that runs the background tasks. The question is where should this to be imported file be placed ? Python-RQ does not seem to recognise if I put it inside Products directory. It throws no module named Products.xyz. Below is the code snippet
from redis import Redis
from rq import Queue
from Products.def_update_company_status import ae_update_company_status
q = Queue(connection=Redis())
def rq_worker(context):
q.enqueue(ae_update_company_status)
return 'DONE'
The rq_worker function is invoked by the external method.
Below is the error
18:12:40 default: Products.def_update_company_status.ae_update_company_status() (4b2b5c81-e329-4031-a3e7-b9b1bb198278)
18:12:40 ImportError: No module named Products.def_update_company_status
Traceback (most recent call last):
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/worker.py", line 588, in perform_job
rv = job.perform()
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/job.py", line 498, in perform
try:
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/job.py", line 206, in func
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/utils.py", line 150, in import_attribute
module = importlib.import_module(module_name)
File "build/bdist.linux-x86_64/egg/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named Products.def_update_company_status
Traceback (most recent call last):
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/worker.py", line 588, in perform_job
rv = job.perform()
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/job.py", line 498, in perform
try:
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/job.py", line 206, in func
File "/home/zope/ams/lib/python2.6/site-packages/rq-0.6.0-py2.6.egg/rq/utils.py", line 150, in import_attribute
module = importlib.import_module(module_name)
File "build/bdist.linux-x86_64/egg/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named Products.def_update_company_status
18:12:40 Moving job to u'failed' queue
18:12:40
18:12:40 *** Listening on default...