0

I upgraded my org-mode from version 9.0.10 to 9.1.6. Restarted emacs, then launch my usual org-agenda. I get an error message:

org-duration-to-minutes: Invalid duration format: "val"

The error comes from the new file: duration.el

Backtrace:

* org-duration-to-minutes("16:00")
  org-refresh-property(((effort . identity) (effort-minutes . org-duration-to-minutes)) "16:00" nil)
  org-refresh-properties("Effort" ((effort . identity) (effort-minutes . org-duration-to-minutes)))
  org-refresh-effort-properties()
  #[0 "\307\306!\203\f

How do I fix this?

2
  • (org-duration-to-minutes "16:00") works just fine in my emacs 25.3.2 with org-version 9.1.6.
    – Tobias
    Commented Feb 21, 2018 at 13:58
  • This is probably due to my existing org files that are not compatible with the new version. How do I get additional information to debug this?
    – e19293001
    Commented Feb 22, 2018 at 1:11

1 Answer 1

1

Org-mode had became more strict with it's syntax. I found this line in one of my org files.

* Task A
   :PROPERTIES:
   :Effort:   val
   :END:

Another error that can generate is an invalid time format

* Task A
   :PROPERTIES:
   :Effort:   156:0
   :END:

This will cause an error message in the Message buffer

org-duration-to-minutes: Invalid duration format: "156:0"

I hope that more information will be displayed such as line number and the filename so it will be easy to debug for new users and save them time trying to find out what is going wrong.

5
  • I am also experiencing a similar error org-duration-to-minutes: Invalid duration format: "+1:00" but I don't have any effort line in my properties and cannot find the +1:00 string anywhere. Can you give more information about these changes to org-mode?
    – Ajned
    Commented Oct 12, 2019 at 7:57
  • Try to search for :Effort: and see if you can find a invalid format.
    – e19293001
    Commented Oct 14, 2019 at 8:09
  • Thanks for replying. I have double checked and there is no :Effort: entry in any properties of my org file (I only use one for everything). I've tried removing it (the org file) from the agenda and the error still persists. I don't have any clue of what might be happening.
    – Ajned
    Commented Oct 14, 2019 at 8:19
  • 2
    Ok, I found what the issue was. Basically I wrote in one of the diary entries 11:30AM-13:00PM and the calendar doesn't like the redundancy of 13:00 + PM. After removing AM and PM it worked fine. I hope this might help someone that stumbles upon the same issue.
    – Ajned
    Commented Oct 14, 2019 at 8:30
  • @Ajned you are a life-saver.
    – hartshoj
    Commented May 21, 2021 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.