Giter Club home page Giter Club logo

caldav-go's People

Contributors

dmlambea avatar dolanor avatar johnboiles avatar thegrumpylion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

caldav-go's Issues

"panic: reflect: call of reflect.Append on ptr Value" during hydrateProperty

It looks like it cannot hydrate the following property, when I run it in a debugger that is the property being handled.

CATEGORIES:http://schemas.google.com/g/2005#event

I just started with Golang, I already tried to fix it but I can't :-/ I guess it's the hash "#" ?

stack:

panic: reflect: call of reflect.Append on ptr Value

goroutine 1 [running]:
reflect.flag.mustBe(0x196, 0x17)
	/usr/lib/golang/src/reflect/value.go:208 +0xde
reflect.Append(0x8121e0, 0xc0001303c0, 0x196, 0xc00019ea68, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/lib/golang/src/reflect/value.go:2032 +0x60
github.com/dolanor/caldav-go/icalendar.hydrateProperty(0x8121e0, 0xc0001303c0, 0x196, 0xc0000cc280, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:200 +0x5df
github.com/dolanor/caldav-go/icalendar.hydrateProperties(0x82ba80, 0xc0001302c0, 0x16, 0xc0004ad5e0, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:270 +0x4e0
github.com/dolanor/caldav-go/icalendar.hydrateComponent(0x82ba80, 0xc0001302c0, 0x16, 0xc0004ad5e0, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:302 +0x412
github.com/dolanor/caldav-go/icalendar.hydrateNestedComponent(0x7f2580, 0xc0006ce4e8, 0x197, 0xc0004ad5e0, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:224 +0x120
github.com/dolanor/caldav-go/icalendar.hydrateProperties(0x821e20, 0xc0006ce480, 0x16, 0xc0004ad440, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:284 +0xbd2
github.com/dolanor/caldav-go/icalendar.hydrateComponent(0x821e20, 0xc0006ce480, 0x16, 0xc0004ad440, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:302 +0x412
github.com/dolanor/caldav-go/icalendar.hydrateValue(0x821e20, 0xc0006ce480, 0x16, 0xc0004ad3c0, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:353 +0xf1b
github.com/dolanor/caldav-go/icalendar.Unmarshal(0xc0003a4480, 0x231, 0x821e20, 0xc0006ce480, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:363 +0x1e1
github.com/dolanor/caldav-go/caldav.(*Response).Decode(0xc000162120, 0x821e20, 0xc0006ce480, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/caldav/response.go:29 +0x2f3
github.com/dolanor/caldav-go/caldav.(*Client).GetEvents(0xc00000e380, 0xc00036c0c0, 0x51, 0x0, 0x0, 0x0, 0x0, 0x0)
	/home/roomen/go/pkg/mod/github.com/dolanor/[email protected]/caldav/client.go:130 +0x732

for completeness the whole Event that I'm fetching:

BEGIN:VCALENDAR
CALSCALE:GREGORIAN
VERSION:2.0
PRODID:-//SabreDAV//SabreDAV//EN
BEGIN:VEVENT
DTSTART;VALUE=DATE:20120114
DTEND;VALUE=DATE:20120115
DTSTAMP:20150209T114140Z
UID:[email protected]
ATTENDEE;CUTYPE=INDIVIDUAL;ROLE=REQ-PARTICIPANT;PARTSTAT=ACCEPTED;X-NUM-GUE
 STS=0:mailto:[email protected]
CREATED:20111214T180041Z
DESCRIPTION:
LAST-MODIFIED:20111214T180041Z
LOCATION:Thuis
SEQUENCE:1
STATUS:TENTATIVE
SUMMARY:REDACTED BECAUSE PRIVACY
TRANSP:OPAQUE
CATEGORIES:http://schemas.google.com/g/2005#event
END:VEVENT
END:VCALENDAR

SOGO

v0.2.0

Hi, I'm trying to get the caldav events from my server, and after uncommenting the log in the Decode function I got a bit more to report. Still I'm fairly new and am not entirely sure what's going on.

That's the code from the example

   server, err := caldav.NewServer("https://username:[email protected]/SOGo/dav/davusername/Calendar/")

   client := caldav.NewClient(server, http.DefaultClient)

   ft, err := client.GetEvents("/personal.ics")
.......
BEGIN:VTODO
DTSTAMP:20201212T152404Z
UID:b0b175bd-81b6-4a70-ba23-63dee4f1232f
SEQUENCE:2
CREATED:20201129T143524Z
LAST-MODIFIED:20201212T145458Z
SUMMARY:Digitec Bill
CLASS:PUBLIC
STATUS:COMPLETED
DUE;TZID=Europe/Zurich:20201201T130001
COMPLETED:20201212T145356Z
PERCENT-COMPLETE:100
END:VTODO
X-WR-CALNAME:Personal Calendar
END:VCALENDAR
panic: reflect: call of reflect.Append on ptr Value

goroutine 1 [running]:
reflect.flag.mustBe(...)
        /usr/lib/go/src/reflect/value.go:221
reflect.Append(0x6d7b20, 0xc0005699c0, 0x196, 0xc0005b9490, 0x1, 0x1, 0x0, 0x0, 0x0)
        /usr/lib/go/src/reflect/value.go:2044 +0x205
github.com/dolanor/caldav-go/icalendar.hydrateProperty(0x6d7b20, 0xc0005699c0, 0x196, 0xc0000cdfc0, 0xc000180fe0, 0xc000569901)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:200 +0x29e
github.com/dolanor/caldav-go/icalendar.hydrateProperties(0x6ed8c0, 0xc0005698c0, 0x16, 0xc000782160, 0x6, 0x0)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:270 +0x3e5
github.com/dolanor/caldav-go/icalendar.hydrateComponent(0x6ed8c0, 0xc0005698c0, 0x16, 0xc000782160, 0xc0005698c0, 0x16)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:302 +0x26d
github.com/dolanor/caldav-go/icalendar.hydrateNestedComponent(0x6bf7a0, 0xc00015e1e8, 0x197, 0xc000782160, 0x0, 0x0)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:224 +0xd6
github.com/dolanor/caldav-go/icalendar.hydrateProperties(0x6e5a00, 0xc00015e180, 0x16, 0xc00025c2a0, 0x9, 0x0)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:284 +0x751
github.com/dolanor/caldav-go/icalendar.hydrateComponent(0x6e5a00, 0xc00015e180, 0x16, 0xc00025c2a0, 0xc00055e768, 0x1)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:302 +0x26d
github.com/dolanor/caldav-go/icalendar.hydrateValue(0x6e5a00, 0xc00015e180, 0x16, 0xc00025c1c0, 0x0, 0xc00015bd38)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:353 +0xbf2
github.com/dolanor/caldav-go/icalendar.Unmarshal(0xc000484000, 0x15a95, 0x6e5a00, 0xc00015e180, 0x15a95, 0x1fe00)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/icalendar/unmarshal.go:363 +0xdc
github.com/dolanor/caldav-go/caldav.(*Response).Decode(0xc0000ca000, 0x6e5a00, 0xc00015e180, 0x0, 0x0)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/caldav/response.go:31 +0x331
github.com/dolanor/caldav-go/caldav.(*Client).GetEvents(0xc00000eda0, 0x7247b0, 0xd, 0x0, 0x0, 0xc00015bf48, 0x6a0913, 0xc00015bf38)
        /home/x/go/pkg/mod/github.com/dolanor/[email protected]/caldav/client.go:130 +0x4e7
main.main()
        /home/x/projects/echo-gorm-example/main.go:30 +0xb5
exit status 2


**When I call the Features Function that's the response**,
[calendar-access calendar-schedule calendar-auto-schedule calendar-proxy calendar-query-extended]

Support for VTODO components

Hello!

I am trying to consume to do items from a CalDAV server but I am getting the following error:

unable to find matching component for VCALENDAR

I believe there is no support for VTODO components in the library, would it be possible to add it?

PutEvents - 500 Request Failed - SOGO

I'm trying to put events on SOGO calendar but this error occurs. Same code works with Radicale.

Any ideas?

2022/02/07 12:33:13 error: unable to put calendar
func: github.com/dolanor/caldav-go/caldav.(*Client).PutEvents-fm
context: *caldav.Client
cause: error: unexpected server response 500 Request Failed
func: github.com/dolanor/caldav-go/caldav.(*Client).PutCalendars-fm
context: *caldav.Client
cause: 
exit status 1

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.