moskrc / crawlerdetect

🕷CrawlerDetect is a Python class for detecting bots/crawlers/spiders via the user agent
MIT License
40 stars 10 forks source link

Error when importing version 0.1.8 #13

Closed Aran-Fey closed 1 hour ago

Aran-Fey commented 5 hours ago

Version 0.1.8 is broken and can't be imported.

Code:

import crawlerdetect

Output:

Traceback (most recent call last):
  File "D:\Users\Aran-Fey\Desktop\temp {e}\untitled.py", line 1, in <module>
    import crawlerdetect
  File "C:\Python312\Lib\site-packages\crawlerdetect\__init__.py", line 6, in <module>
    from .src.crawlerdetect import CrawlerDetect, get_crawlerdetect_version
  File "C:\Python312\Lib\site-packages\crawlerdetect\src\crawlerdetect.py", line 20, in <module>
    version = get_crawlerdetect_version()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\site-packages\crawlerdetect\src\crawlerdetect.py", line 17, in get_crawlerdetect_version
    return config["crawlerdetect"]["version"]
           ~~~~~~^^^^^^^^^^^^^^^^^
  File "C:\Python312\Lib\configparser.py", line 941, in __getitem__
    raise KeyError(key)
KeyError: 'crawlerdetect'
Aran-Fey commented 5 hours ago

Please yank 0.1.8 from pypi when you release the bugfix for this.