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?

  • (org-duration-to-minutes "16:00") works just fine in my emacs 25.3.2 with org-version 9.1.6. – Tobias Feb 21 '18 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 Feb 22 '18 at 1:11
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.

| improve this answer | |
  • 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 Oct 12 '19 at 7:57
  • Try to search for :Effort: and see if you can find a invalid format. – e19293001 Oct 14 '19 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 Oct 14 '19 at 8:19
  • 1
    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 Oct 14 '19 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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