Code Monkey home page Code Monkey logo

Comments (3)

jtpavlock avatar jtpavlock commented on July 20, 2024

Hi there, currently out of town so unable to properly test, but there does seem to be an error with the code! Does it work if you change the two instances of config.Config to just Config?

from moe.

jaimet avatar jaimet commented on July 20, 2024

If I change config.Config on line 13 to just Config, then I get:

$ ./please-dear-lord-deliver-me-from-beets 
Traceback (most recent call last):
  File "/home/wtf/argh/./please-dear-lord-deliver-me-from-beets", line 13, in main
    Config(config_dir=Path.home() / ".config" / "my_script", init_db=False)
                      ^^^^
NameError: name 'Path' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/wtf/argh/./please-dear-lord-deliver-me-from-beets", line 33, in <module>
    main()
  File "/home/wtf/argh/./please-dear-lord-deliver-me-from-beets", line 14, in main
    except config.ConfigValidationError as err:
           ^^^^^^
NameError: name 'config' is not defined. Did you mean: 'Config'?

If I then change Path.home() on line 13 to pathlib.Path.home(), and config.ConfigValidationError on line 14 to ConfigValidationError then the script parses without error. 🙏

Here's the "working" version (renamed to .txt to get round github's attachment restrictions). I'll try to fix the snippet on the api page next.

from moe.

jaimet avatar jaimet commented on July 20, 2024

After some reflection, the fix for the api page is obvious: just set it to the first 10 lines of the "working" version above. All fixed.

from moe.

Related Issues (6)

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.