Giter Site home page Giter Site logo

amazon-search-rank's People

Contributors

rafalf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

amazon-search-rank's Issues

ValueError: Unable to configure handler 'file'

Hello, Raf

I tried it out today, and find some small issues. I'm not a pro programer, and I can't seem to find way to fix this

  • When I run 'run.py', I got traceback below
Traceback (most recent call last):
  File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/config.py", line 563, in configure
    handler = self.configure_handler(handlers[name])
  File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/config.py", line 744, in configure_handler
    result = factory(**kwargs)
  File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/handlers.py", line 146, in __init__
    if maxBytes > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run.py", line 314, in <module>
    main()
  File "run.py", line 230, in main
    logger = get_logger()
  File "run.py", line 103, in get_logger
    logging.config.dictConfig(LOGGING_CONFIG)
  File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/config.py", line 808, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/local/Cellar/[email protected]/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/logging/config.py", line 570, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file'
  • So I tried to add int()
    change the code in line from 228 to 233:
conf = get_config()
    input_data = get_csv(conf.get(int('input_file')))
    logger = get_logger()
    next_selector = '.a-last>a'
    sponsored_append_selector = '[data-component-type="sp-sponsored-result"]'
  • Then I got thie traceback:
Traceback (most recent call last):
  File "run.py", line 314, in <module>
    main()
  File "run.py", line 229, in main
    input_data = get_csv(conf.get(int('input_file')))
ValueError: invalid literal for int() with base 10: 'input_file'

Now I really don't know what to do, could you kindly help?

Also, I found pyyaml updated load() for security reasons, you need to add Loader=yaml.FullLoader
I have change the code from 109 to 112:

def get_config():
    with open('config.yaml', 'r') as yaml_file:
        yaml_config = yaml.load(yaml_file, Loader=yaml.FullLoader)
        return yaml_config

ValueError: Unable to configure handler 'file'

Hi, I was trying to run this code and this error popped up, I'm new to programming. I don't know how to fix this.

`Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 563, in configure
handler = self.configure_handler(handlers[name])
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 744, in configure_handler
result = factory(**kwargs)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\logging\handlers.py", line 146, in init
if maxBytes > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 808, in dictConfig
dictConfigClass(config).configure()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\logging\config.py", line 570, in configure
raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'file'`

Sorry saw the other case

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.