Scrapy traceback error (invalid syntax) - python

I've been following several tutorials and I'm obtaining SyntaxError continuously:
C:\Users\Luis\mercado>scrapy crawl mercado -t csv
Traceback (most recent call last):
File "C:\Users\Luis\Anaconda2\Scripts\scrapy-script.py", line 5, in
<module>
sys.exit(scrapy.cmdline.execute())
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\cmdline.py", line
149,
in execute
cmd.crawler_process = CrawlerProcess(settings)
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\crawler.py", line
249,
in __init__
super(CrawlerProcess, self).__init__(settings)
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\crawler.py", line
137,
in __init__
self.spider_loader = _get_spider_loader(settings)
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\crawler.py", line
336,
in _get_spider_loader
return loader_cls.from_settings(settings.frozencopy())
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\spiderloader.py",
line 61, in from_settings return cls(settings)
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\spiderloader.py",
line 25, in __init__
self._load_all_spiders()
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\spiderloader.py",
line 47, in _load_all_spiders
for module in walk_modules(name):
File "C:\Users\Luis\Anaconda2\lib\site-packages\scrapy\utils\misc.py",
line 71
, in walk_modules
submod = import_module(fullpath)
File "C:\Users\Luis\Anaconda2\lib\importlib\__init__.py", line 37, in
import_module
__import__(name)
File "C:\Users\Luis\mercado\mercado\spiders\spider.py", line 7
Class MercadoSpider(CrawlSpider):
SyntaxError: invalid syntax
Could you help me with that please?

In Python, class is always written in lower case. You have a syntax error in your Python.

Related

ModuleNotFoundError: No module named 'tornado' on ubuntu

When I am trying to run my application I got the following error
Traceback (most recent call last):
File "./app.py", line 32, in <module>
from pushservices.bootstrap import init_messaging_agents
File "/home/airnotifier/airnotifier/pushservices/bootstrap.py", line 2, in <module>
from .apns import *
File "/home/airnotifier/airnotifier/pushservices/apns.py", line 5, in <module>
from util import json_encode
File "/home/airnotifier/airnotifier/util.py", line 37, in <module>
import tornado
ModuleNotFoundError: No module named 'tornado'
I tried to run this command to install tornado
python3 -m pip install tornado
then I got the following message
Requirement already satisfied: tornado in /usr/local/lib/python3.8/dist-packages (6.0.3)
followed by the following error log
--- Logging error ---
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 177, in emit
self.console.print(renderable, overflow="ignore", crop=False, style=style)
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1752, in print
extend(render(renderable, render_options))
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1390, in render
for render_output in iter_render:
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
for line in lines:
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/segment.py", line 245, in split_lines
for segment in segments:
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/console.py", line 1368, in render
renderable = rich_cast(renderable)
File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
renderable = cast_method()
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
pip_cmd = get_best_invocation_for_this_pip()
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/entrypoints.py", line 58, in get_best_invocation_for_this_pip
if found_executable and os.path.samefile(
File "/usr/lib/python3.8/genericpath.py", line 101, in samefile
s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip3.8'
Call stack:
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.8/dist-packages/pip/__main__.py", line 31, in <module>
sys.exit(_main())
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/main.py", line 70, in main
return command.main(cmd_args)
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 101, in main
return self._main(args)
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
self.handle_pip_version_check(options)
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 148, in handle_pip_version_check
pip_self_version_check(session, options)
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/self_outdated_check.py", line 237, in pip_self_version_check
logger.info("[present-rich] %s", upgrade_prompt)
File "/usr/lib/python3.8/logging/__init__.py", line 1446, in info
self._log(INFO, msg, args, **kwargs)
File "/usr/lib/python3.8/logging/__init__.py", line 1589, in _log
self.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1599, in handle
self.callHandlers(record)
File "/usr/lib/python3.8/logging/__init__.py", line 1661, in callHandlers
hdlr.handle(record)
File "/usr/lib/python3.8/logging/__init__.py", line 954, in handle
self.emit(record)
File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/logging.py", line 179, in emit
self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.1.2', new='22.2.2'),)
can anyone please tell me what should I do and what is the problem ?
Here's a possible scenario that could cause this:
you execute pip install tornado as a user but you run the tornado project as another user.
Sorry for my terrible english, hope you can understand

Module 'cryptography.utils' has no attribute 'bit_length'

I am currently trying to figure out how to use netmiko to automate some of my routine work.Such as getting configuration backup, creating vlans etc.I've managed to use it on Aruba and Huawei Switches without problem.But on alcatel switch I'm facing this issue:
Unknown exception: module 'cryptography.utils' has no attribute 'bit_length'
Traceback (most recent call last):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 2075, in run
self.kex_engine.parse_next(ptype, m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 101, in parse_next
return self._parse_kexdh_gex_reply(m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 281, in _parse_kexdh_gex_reply
self.transport._verify_key(host_key, sig)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 1886, in _verify_key
if not key.verify_ssh_sig(self.H, Message(sig)):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py", line 148, in verify_ssh_sig
key = dsa.DSAPublicNumbers(
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py", line 212, in public_key
return backend.load_dsa_public_numbers(self)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 871, in load_dsa_public_numbers
dsa._check_dsa_parameters(numbers.parameter_numbers)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py", line 145, in _override_check_dsa_parameters
if crypto_utils.bit_length(parameters.q) not in [160, 256]:
AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
Traceback (most recent call last):
File "C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py", line 75, in
config_backup(cihaz_secim,ip_address,username,password)
File "C:\Users\melih.celik\Desktop\New_Backup\Yedek\Coding\Rand stuff\ssh_deneme(toplu).py", line 12, in config_backup
net_connect=ConnectHandler(**switch) #Baglanti kuruldu.
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\ssh_dispatcher.py", line 312, in ConnectHandler
return ConnectionClass(*args, **kwargs)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 346, in init
self._open()
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 351, in _open
self.establish_connection()
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\base_connection.py", line 920, in establish_connection
self.remote_conn_pre.connect(**ssh_connect_params)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\client.py", line 406, in connect
t.start_client(timeout=timeout)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 660, in start_client
raise e
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 2075, in run
self.kex_engine.parse_next(ptype, m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 101, in parse_next
return self._parse_kexdh_gex_reply(m)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\kex_gex.py", line 281, in _parse_kexdh_gex_reply
self.transport._verify_key(host_key, sig)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\transport.py", line 1886, in _verify_key
if not key.verify_ssh_sig(self.H, Message(sig)):
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\paramiko\dsskey.py", line 148, in verify_ssh_sig
key = dsa.DSAPublicNumbers(
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\primitives\asymmetric\dsa.py", line 212, in public_key
return backend.load_dsa_public_numbers(self)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\cryptography\hazmat\backends\openssl\backend.py", line 871, in load_dsa_public_numbers
dsa._check_dsa_parameters(numbers.parameter_numbers)
File "C:\Users\melih.celik\AppData\Local\Programs\Python\Python39\lib\site-packages\netmiko\tplink\tplink_jetstream.py", line 145, in _override_check_dsa_parameters
if crypto_utils.bit_length(parameters.q) not in [160, 256]:
AttributeError: module 'cryptography.utils' has no attribute 'bit_length'
Thanks for your help in advance.
It looks like tplink_jetstream.py assumes that a (now removed) helper function is available to it. The simplest fix here would be to go into that file and modify the line containing crypto_utils.bit_length(parameters.q) to read parameters.q.bit_length() instead.

Winrm error in while restarting the celeryd service

The module winrm is installed with all its dependencies, but still the celeryd service is not able to run. Here is the error trace:
worker1#man11idm01.stman00.isyntax.net: DOWN /usr/lib64/python2.6/site-packages/cryptography/__init__.py:26: DeprecationWarning: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of cryptography will drop support for Python 2.6 DeprecationWarning Traceback (most recent call last): File "/usr/lib64/python2.6/runpy.py", line 122, in _run_module_as_main
"__main__", fname, loader, pkg_name) File "/usr/lib64/python2.6/runpy.py", line 34, in _run_code
exec code in run_globals File "/usr/lib/python2.6/site-packages/celery/__main__.py", line 54, in <module>
main() File "/usr/lib/python2.6/site-packages/celery/__main__.py", line 30, in main
main() File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 81, in main
cmd.execute_from_commandline(argv) File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 769, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv))) File "/usr/lib/python2.6/site-packages/celery/bin/base.py", line 311, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:]) File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 761, in handle_argv
return self.execute(command, argv) File "/usr/lib/python2.6/site-packages/celery/bin/celery.py", line 693, in execute
).run_from_argv(self.prog_name, argv[1:], command=argv[0]) File "/usr/lib/python2.6/site-packages/celery/bin/worker.py", line 179, in run_from_argv
return self(*args, **options) File "/usr/lib/python2.6/site-packages/celery/bin/base.py", line 274, in
__call__
ret = self.run(*args, **kwargs) File "/usr/lib/python2.6/site-packages/celery/bin/worker.py", line 212, in run
state_db=self.node_format(state_db, hostname), **kwargs File "/usr/lib/python2.6/site-packages/celery/worker/__init__.py", line 95, in __init__
self.app.loader.init_worker() File "/usr/lib/python2.6/site-packages/celery/loaders/base.py", line 128, in init_worker
self.import_default_modules() File "/usr/lib/python2.6/site-packages/celery/loaders/base.py", line 121, in import_default_modules
tuple(maybe_list(self.app.conf.CELERY_INCLUDE)) File "/usr/lib/python2.6/site-packages/celery/loaders/base.py", line 103, in import_task_module
return self.import_from_cwd(module) File "/usr/lib/python2.6/site-packages/celery/loaders/base.py", line 112, in import_from_cwd
package=package, File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
return imp(module, package=package) File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
self.gen.throw(type, value, traceback) File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 64, in cwd_in_path
yield cwd File "/usr/lib/python2.6/site-packages/celery/utils/imports.py", line 101, in import_from_cwd
return imp(module, package=package) File "/usr/lib/python2.6/site-packages/celery/loaders/base.py", line 106, in import_module
return importlib.import_module(module, package=package) File "/usr/lib/python2.6/site-packages/importlib/__init__.py", line 37, in import_module
__import__(name) File "/usr/lib/celery/phim_onsite/operate.py", line 14, in <module>
from phim_onsite.transmit import tx_data, tx_pcm_discovery, tx_deployment_status File "/usr/lib/celery/phim_onsite/transmit.py", line 19, in <module>
from scanline.trinity import scanline_endpoints, scanline_scanner File "/usr/lib/python2.6/site-packages/scanline/trinity.py", line 15, in <module>
from scanline.product.isp import ISPProductScanner File "/usr/lib/python2.6/site-packages/scanline/product/isp.py", line 17, in <module>
from scanline.host.isp import ISPHostScanner File "/usr/lib/python2.6/site-packages/scanline/host/isp.py", line 6, in <module>
from scanline.utilities.win_rm import extract_credentials File "/usr/lib/python2.6/site-packages/scanline/utilities/win_rm.py", line 2, in <module>
import winrm ImportError: No module named winrm
Restarting node worker1#man11idm01.stman00.isyntax.net: * Child terminated with errorcode 255
FAILED
+ exit 0

How to use peewee with scrapinghub

I want to save my data to remote machine by using peewee. When i run my crawler i found following error,
File "/usr/local/lib/python2.7/site-packages/scrapy/commands/crawl.py", line 57, in run
self.crawler_process.crawl(spname, **opts.spargs)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 163, in crawl
return self._crawl(crawler, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 167, in _crawl
d = crawler.crawl(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1445, in unwindGenerator
return _inlineCallbacks(None, gen, Deferred())
--- <exception caught here> ---
File "/usr/local/lib/python2.7/site-packages/twisted/internet/defer.py", line 1299, in _inlineCallbacks
result = g.send(result)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 90, in crawl
six.reraise(*exc_info)
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 72, in crawl
self.engine = self._create_engine()
File "/usr/local/lib/python2.7/site-packages/scrapy/crawler.py", line 97, in _create_engine
return ExecutionEngine(self, lambda _: self.stop())
File "/usr/local/lib/python2.7/site-packages/scrapy/core/engine.py", line 70, in __init__
self.scraper = Scraper(crawler)
File "/usr/local/lib/python2.7/site-packages/scrapy/core/scraper.py", line 71, in __init__
self.itemproc = itemproc_cls.from_crawler(crawler)
File "/usr/local/lib/python2.7/site-packages/scrapy/middleware.py", line 58, in from_crawler
return cls.from_settings(crawler.settings, crawler)
File "/usr/local/lib/python2.7/site-packages/scrapy/middleware.py", line 34, in from_settings
mwcls = load_object(clspath)
File "/usr/local/lib/python2.7/site-packages/scrapy/utils/misc.py", line 44, in load_object
mod = import_module(module)
File "/usr/local/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/app/__main__.egg/annuaire_agence_bio/pipelines.py", line 8, in <module>
exceptions.ImportError: No module named peewee
Any suggestions is more than welcome.
You cannot install module of your own choice on Scrapinhub ... You can only install MySQLDB as per my knowledge, to do that.
Create a file named scrapinghub.yml in your project's main folder with following contents.
projects:
default: 111149
requirements:
file: requirements.txt
Where 111149 is my proejct ID on scrapinghub.
Create another file named requirements.txt in same directory.
and put your required modules along with the version number you are using in that file like so,
MySQL-python==1.2.5
PS: I was using MySQLDB module so I put that.

Mezzanine ImportError when running tests

I have recently upgraded the version of Django from 1.5.5 to 1.6.2 and Mezzanine to 3.0.9.
When I run
python manage.py test
All the tests run without problem.
But When I run project specific tests using
python manage.py test <project-name>
Then I get ImportError. I get that its something to do with Circular Imports.
Here is the stack trace. Please help.
======================================================================
ERROR: Failure: ImportError (cannot import name DisplayableAdmin)
---------------------------------------------------------------------- Traceback (most recent call last): File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/loader.py",
line 411, in loadTestsFromName
addr.filename, addr.module) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/importer.py",
line 47, in importFromPath
return self.importFromDir(dir_path, fqname) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/nose/importer.py",
line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc) File "/Users/devarajn/repos/pari/pari/album/tests.py", line 8, in
from pari.album.admin import AlbumAdmin, AlbumImageInline File "/Users/devarajn/repos/pari/pari/album/admin.py", line 2, in
from mezzanine.core.admin import TabularDynamicInlineAdmin File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/core/admin.py",
line 4, in
from django.contrib.auth.admin import UserAdmin File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/auth/admin.py", line 182, in
admin.site.register(Group, GroupAdmin) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/boot/lazy_admin.py", line 26, in register
super(LazyAdminSite, self).register(*args, **kwargs) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/sites.py", line 92, in register
admin_class.validate(model) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/options.py", line 105, in validate
validator = cls.validator_class() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/validation.py",
line 20, in init
models.get_apps() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 139, in get_apps
self._populate() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 78, in _populate
self.load_app(app_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/db/models/loading.py",
line 99, in load_app
models = import_module('%s.models' % app_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/debug_toolbar/models.py",
line 63, in
patch_root_urlconf() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/debug_toolbar/models.py",
line 51, in patch_root_urlconf
reverse('djdt:render_panel') File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 480, in reverse
app_list = resolver.app_dict[ns] File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 310, in app_dict
self._populate() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 262, in _populate
for pattern in reversed(self.url_patterns): File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 346, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File
"/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/core/urlresolvers.py",
line 341, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/repos/pari/pari/urls.py", line 7, in
admin.autodiscover() File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/boot/init.py",
line 77, in autodiscover
django_autodiscover(*args, **kwargs) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/contrib/admin/init.py",
line 29, in autodiscover
import_module('%s.admin' % app) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/django/utils/importlib.py",
line 40, in import_module
import(name) File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/forms/admin.py",
line 24, in
from mezzanine.pages.admin import PageAdmin File "/Users/devarajn/.pythonbrew/venvs/Python-2.7.3/pari/lib/python2.7/site-packages/mezzanine/pages/admin.py",
line 12, in
from mezzanine.core.admin import DisplayableAdmin, DisplayableAdminForm ImportError: cannot import name
DisplayableAdmin
django-debug-toolbar module was causing the issue.
I rolled back from django-debug-toolbar v1.0.1 to v0.11.
This fixed the error.

Categories

Resources