mastodon import fails because of outdated go-mastodon

54 views
Skip to first unread message

Matthias Teege

unread,
May 23, 2019, 4:52:30 AM5/23/19
to per...@googlegroups.com
Hi,

the mastodon importer fails with 'strconv.ParseInt: parsing "":
invalid syntax'. The problem is the outdated
github.com/mattn/go-mastodon. The problematic function is in
mastodon.go:

func getPaginationID(rawurl, key string) (ID, error) {
u, err := url.Parse(rawurl)
if err != nil {
return "", err
}

id, err := strconv.ParseInt(u.Query().Get(key), 10, 64)
if err != nil {
return "", err
}

return ID(fmt.Sprint(id)), nil
}

which is in upstream:

func getPaginationID(rawurl, key string) (ID, error) {
u, err := url.Parse(rawurl)
if err != nil {
return "", err
}

return ID(u.Query().Get(key)), nil
}

Maybe someone can update the perkeepd repository.

Regards
Matthias

Mathieu Lonjaret

unread,
May 23, 2019, 6:31:04 AM5/23/19
to per...@googlegroups.com
Yeah I've been wanting to update all our deps and I already started. I hope to finish it in the  next few days.


--
You received this message because you are subscribed to the Google Groups "Perkeep" group.
To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/20190523085227.GB3789%40mteege.de.
For more options, visit https://groups.google.com/d/optout.

Matthias Teege

unread,
May 23, 2019, 8:26:48 AM5/23/19
to per...@googlegroups.com
On Thu, May 23, 2019 at 12:30:50PM +0200, Mathieu Lonjaret wrote:

Hi,

> Yeah I've been wanting to update all our deps and I already started. I hope
> to finish it in the next few days.

Thank you for your efforts.
Matthias

Mathieu Lonjaret

unread,
May 27, 2019, 5:47:37 PM5/27/19
to per...@googlegroups.com
Done as part of https://perkeep-review.googlesource.com/c/perkeep/+/19306
> --
> You received this message because you are subscribed to the Google Groups "Perkeep" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to perkeep+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/20190523122645.GC3789%40mteege.de.
Reply all
Reply to author
Forward
0 new messages