Giter VIP home page Giter VIP logo

Comments (7)

IgorKrupenja avatar IgorKrupenja commented on June 20, 2024 1

Yes, just a moment ago discovered that this indeed works without quotes in config 😅 Thank you again for implementing this!

from toggl-cli.

AuHau avatar AuHau commented on June 20, 2024

Hmm this is definitely unfortunate. It will require to create some sort of theming support I guess. I am currently focused on different projects, but I will try to get back to it at some point, but can't promise anything. If anybody would like to make PR for this, it would be appreciated!

from toggl-cli.

IgorKrupenja avatar IgorKrupenja commented on June 20, 2024

Thank you for implementing this! I was wondering what is the proper procedure to change the theme? If I add theme = 'light' to .togglrc under [options], I get ERROR: 'NoneType' object has no attribute 'header' every time I run a toggl-cli command, e.g. toggl now. Am I missing something?

from toggl-cli.

AuHau avatar AuHau commented on June 20, 2024

Hmm can you please re-run the command with env. variable TOGGL_EXCEPTIONS=1 and past the traceback?

from toggl-cli.

IgorKrupenja avatar IgorKrupenja commented on June 20, 2024

Sure, this is the traceback I got:

Traceback (most recent call last):
  File "/usr/local/bin/toggl", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/toggl/toggl.py", line 12, in main
    cli.entrypoint(args or sys.argv[1:])
  File "/usr/local/lib/python3.7/site-packages/toggl/cli/commands.py", line 35, in entrypoint
    cli(args, obj=obj or {})
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/toggl/cli/commands.py", line 485, in entry_now
    helpers.entity_detail(api.TimeEntry, current, primary_field='description', obj=ctx.obj)
  File "/usr/local/lib/python3.7/site-packages/toggl/cli/helpers.py", line 97, in entity_detail
    click.style(key.replace('_', ' ').capitalize(), **theme.header),
AttributeError: 'NoneType' object has no attribute 'header'

My complete .togglrc:

[version]
version = 2.2.0

[auth]
api_token = (removed)

[options]
tz = local
theme = 'light'

from toggl-cli.

AuHau avatar AuHau commented on June 20, 2024

Oh, I see the problem now. Don't use ' in the config 😉 Or I think that should be the problem.

But at least you pointed out that I did not really implemented any checks for when you load non-existing theme 😅 Will fix that...

from toggl-cli.

AuHau avatar AuHau commented on June 20, 2024

Sweet! Glad it works :-)

from toggl-cli.

Related Issues (20)

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.