I'm using scrapy shell inside virtualenv. IPython is installed inside virtualenv. When I start scrapy shell using
scrapy shell 'https://example.com'
and press tab for autocomplete suggestions, it shows a lot of debug information. How can I disable this?
In [1]: from scra2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser start
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser calculated
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff: line_lengths old: 1, new: 1
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff replace old[1:1] new[1:1]
2018-03-23 10:05:45 [parso.python.diff] DEBUG: parse_part from 1 to 1 (to 0 in part parser)
2018-03-23 10:05:45 [parso.python.diff] DEBUG: diff parser end

https://github.com/ipython/ipython/issues/10946 looks like it's reported bug here.
In case you need debug logging in ipython, try to
logging.getLogger('parso.cache').disabled=True
logging.getLogger('parso.cache.pickle').disabled=True
and keep wait for parso update
Try doing this to set the logging level to WARNING:
import logging
logging.getLogger().setLevel(logging.WARNING);
Any log messages of level INFO or DEBUG shouldn't appear anymore. You can also set the log level to logging.ERROR. Then WARNING messages won't appear as well.
Good luck!
You can use the -L command-line option to change the log level to INFO:
scrapy shell -L INFO https://example.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With