question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

from scrapy import signals, log as scrapy_log builtins.ImportError: cannot import name 'log'

See original GitHub issue

I installed scrapyrt today, but calling a GET request results in an error, which was reported at https://github.com/scrapy/scrapyd/issues/311

I followed the issue above, and downgraded Twisted with pip3 install Twisted==18.9.0.

After that, however, scrapyrt is producing a different error, saying…

2019-07-28 16:53:22+0200 [scrapyrt] Unhandled Error
	Traceback (most recent call last):

       ...

	File "/home/user/app/scrapy-test/my_venv/lib64/python3.6/site-packages/scrapyrt/core.py", line 9, in <module>
    	from scrapy import signals, log as scrapy_log
	builtins.ImportError: cannot import name 'log'

Could I ask for help to fix it?

It’s running on Python 3.6.3 Scrapy is 1.7.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
korneelcommented, Jul 30, 2019

A workaround is to downgrade Scrapy to v1.6.0.

0reactions
pawelmhmcommented, Sep 12, 2019

fixed in #90

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: cannot import name 'log' from 'scrapy'
Did you try import logging instead of 'from scrapy import signals, log' after 'pip install scrapy'.
Read more >
Logging — Scrapy 2.7.1 documentation
You can use a different logger just by getting its name with the logging.getLogger function: import logging logger = logging.
Read more >
ImportError: cannot import name 'log' - Support - Zyte
I am using python 3.6, I have the requirements.txt file in the same directory as scrapy.cfg and its showing python 2.7 not sure...
Read more >
Logging — Scrapy 1.0.5 文档
Scrapy uses Python's builtin logging system for event logging. We'll provide some simple examples to ... import logging logging.warning("This is a warning").
Read more >
[Tutor] ImportError: cannot import name log
import sys from django.core.signals import got_request_exception from . import log logger = log._get_logger() def got_request_exception_callback(sender ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found