kidd / org-gcal.el

Org sync with Google Calendar. (active maintained project as of 2019-11-06)
436 stars 47 forks source link

wrong-type-argument hash-table-p nil #89

Open haji-ali opened 4 years ago

haji-ali commented 4 years ago

I configured my org-gcal according to the instructions in README.org, however when I run org-gcal-fetch, only one event get pulled from my calendar into the my org file and I get the error (wrong-type-argument hash-table-p nil)

If I redo org-gcal-fetch I get org-gcal--archive-old-event: Org-gcal error: Couldn’t parse /schedule.org

and I have to delete the file before doing org-gcal-fetch which repeats the first error.

I am testing with a calendar containing a single event. This is schedule.org after running org-gcal-fetch and getting the error


* Test
:PROPERTIES:
:ETag:     "3179332857274000"
:calendar-id: REDACTED
:ID:       REDACTED
:END:
telotortium commented 4 years ago

I believe I've fixed this to always set org-gcal-sync-tokens-clear to an empty hash, never nil. Can you pull the latest release and try again?

On Sat, May 16, 2020 at 2:54 PM Abdul-Lateef Haji-Ali < notifications@github.com> wrote:

I configured my org-gcal according to the instructions in README.org, however when I run org-gcal-fetch, only one event get pulled from my calendar into the my org file and I get the error (wrong-type-argument hash-table-p nil)

If I redo org-gcal-fetch I get org-gcal--archive-old-event: Org-gcal error: Couldn’t parse /schedule.org

and I have to delete the file before doing org-gcal-fetch which repeats the first error.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kidd/org-gcal.el/issues/89, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANMVDPTC3IYELDGP2BWNXLRR4DQHANCNFSM4NDC3T5Q .

-- Robert Irelan rirelan@gmail.com

haji-ali commented 4 years ago

Do you mean the latest commit 2ee2b31547e? That's the commit I am on and I still see the same error.

telotortium commented 4 years ago

Try running org-gcal-sync-tokens-clear to set the hash to a known state and see if you still see the error.

haji-ali commented 4 years ago

I just tried doing this and got the same error. The problem is that I cannot trace where the error is happening exactly, since it is a "deferred error".

For reference here's all I did as related to org-gcal:

  (setq org-gcal-client-id "CLIENT ID"
        org-gcal-client-secret "SECRET"
        org-gcal-file-alist `(("CALENDAR ID" . ,(concat org-directory "gcal.org")))
        )
(org-gcal-sync-tokens-clear)
(org-gcal-sync)
telotortium commented 4 years ago

Okay, run (setq debug-on-message "deferred error") and try again, and then send me the backtrace.

haji-ali commented 4 years ago
Debugger entered--Lisp error: "deferred error : (wrong-type-argument hash-table-p nil)"
  message("deferred error : %S" (wrong-type-argument hash-table-p nil))
  deferred:exec-task(#s(deferred :callback #f(compiled-function (_) #<bytecode 0x25339c9>) :errorback deferred:default-errorback :cancel deferred:default-cancel :next nil :status nil :value nil) ng (wrong-type-argument hash-table-p nil))
  deferred:worker()
  apply(deferred:worker nil)
  timer-event-handler([t 24263 38298 561460 nil deferred:worker nil nil 932000])
htc-htc commented 4 years ago

That's the exact error I'm having, does anyone have any ideas on this?

SkyLeite commented 4 years ago

Same error here

leshy commented 3 years ago

same here, fresh install on doom emacs files are created but completely empty, org-gcal-sync-tokens-clear doesn't have an effect on this

API responses look fine, errors seems to be caused somewhere deeper in the code

{
   "kind": "calendar#event",
   "etag": "\"###\"",
   "id": "#####
   "status": "confirmed",
   "htmlLink": "https://www.google.com/calendar/event?eid=####
   "created": "2020-11-04T09:39:21.000Z",
   "updated": "2020-11-04T09:39:21.055Z",
   "summary": "test event",
   "creator": {
    "email": "####",
    "self": true
   },
   "organizer": {
    "email": "####",
    "self": true
   },
   "start": {
    "dateTime": "2020-11-04T16:00:00+01:00"
   },
   "end": {
    "dateTime": "2020-11-04T17:00:00+01:00"
   },
   "iCalUID": "#####"
   "sequence": 0,
   "reminders": {
    "useDefault": true
   }
  }
kidd commented 3 years ago

you could try m-x toggle-debug-on-error. That should give you a stacktrace and help you debug