MD file errors (steps are not generated & nil pointer)

213 views
Skip to first unread message

Mehmet Rasid Gencosmanoglu

unread,
Jun 21, 2020, 3:04:24 AM6/21/20
to codelab-authors
Hi,

This is the first time i am trying to use codelab tools. I followed the tutorial here and everything was just fine until I export my MD input.
As you can see in the below image only the first step is generated. Yellow marked headlines are not generated. I used the md example input in the tutorial which you can find in the attachment. 

I've also tried the codelab.md file in the /claat/sample folder but the result was different.
This time claat export file.md command returning below exception with the sample input. The md files seem correct. What might be the reason for these two errors? Am I missing something?

go version go1.14.4 windows/amd64
node version v12.13.1

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x20 pc=0x7163cc]

goroutine 21 [running]:
        C:/Users/mehme/go/src/github.com/googlecodelabs/tools/claat/fetch/fetch.go:388 +0x5c
github.com/googlecodelabs/tools/claat/fetch.(*Fetcher).slurpBytes(0xc0000d28c0, 0xc0000a0180, 0x1b, 0xc0000a1f00, 0x1d, 0xc0000ca5a0, 0x2d, 0x0, 0x0, 0x0, ...)
        C:/Users/mehme/go/src/github.com/googlecodelabs/tools/claat/fetch/fetch.go:254 +0x437
github.com/googlecodelabs/tools/claat/fetch.(*Fetcher).SlurpImages.func1(0xc0000d28c0, 0xc0000a0180, 0x1b, 0xc0000a1f00, 0x1d, 0xc0000d49c0, 0xc0001ff810)
        C:/Users/mehme/go/src/github.com/googlecodelabs/tools/claat/fetch/fetch.go:205 +0x9f
        C:/Users/mehme/go/src/github.com/googlecodelabs/tools/claat/fetch/fetch.go:203 +0x158




how-to-write-a-codelab.md
codelab.md

Sean Davis

unread,
Jun 21, 2020, 6:43:55 AM6/21/20
to Mehmet Rasid Gencosmanoglu, codelab-authors
Hi Mehmet,

A friend recently hit the same issue...

"

I have hit one problem while generating docs from your repo though - claat export ./lab.md was trowing bunch of errors. They seamed to be related to the image fetching failing.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x132f7e9]

goroutine 9 [running]:
created by github.com/googlecodelabs/tools/claat/fetch.(*Fetcher).SlurpImages
/Users/saulius/go/src/github.com/googlecodelabs/tools/claat/fetch/fetch.go:203 +0x15a

I solved it by downloading all images to the local assets directory instead of referencing remote image urls. claat stopped complaining after that. Just as FYI if you ever see the same.

"


You can try his temporary workaround until the issue is resolved. Note - I was unable to reproduce the issue myself.


Thanks,

Sean


--
You received this message because you are subscribed to the Google Groups "codelab-authors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codelab-autho...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/codelab-authors/06bab1af-17de-4789-97a9-5f2efcd8769ao%40googlegroups.com.


--

Sean Davis | API Ninja | Google Manchester | davi...@google.com | +44 2038209744

AFK? I am probably biking!

cooper

unread,
Jun 21, 2020, 1:25:20 PM6/21/20
to codelab-authors
Have the same issue.

Sean, can you be more specific re

I solved it by downloading all images to the local assets directory instead of referencing remote image urls. claat stopped complaining after that. Just as FYI if you ever see the same.


Mehmet Rasid Gencosmanoglu

unread,
Jun 22, 2020, 3:23:50 AM6/22/20
to codelab-authors
Thanks for the answer, even if i dont use remote URLs for the images, steps and durations were not created somehow. (Only the first step is created as u can see in the image in my first mail)
Do you have any idea about this problem?

21 Haziran 2020 Pazar 13:43:55 UTC+3 tarihinde Sean Davis yazdı:
To unsubscribe from this group and stop receiving emails from it, send an email to codelab...@googlegroups.com.
Message has been deleted

Alexander Ivanov ✔

unread,
Jan 22, 2021, 1:39:48 AM1/22/21
to codelab-authors
Hi!

You need to change EOFs of your file from CRLF to LF.

Check the attachments.



Best,
codelab.md

Paul Eldridge

unread,
Mar 10, 2023, 2:12:07 PM3/10/23
to codelab-authors
Hey folks! I'm having this mysterious Go panic error as well. So is the consensus that the cause is that Go Slurp Fetch routine breaking when trying to retrieve a remote asset? 

Paul Eldridge

unread,
Mar 10, 2023, 5:09:35 PM3/10/23
to codelab-authors
Ah never mind, resolved! Found the problem:

  • I was following the Codelab format guide's guidance to embed videos like this in the markdown: ![VideoDescription](https://video.url)
  • However the URL was pointing to a video hosted on Google Drive for our internal usage only. I don't think Claat or Codelabs could access it (or our hosting solution)
  • So the "slurp" fetcher was freaking out
I took out the bang (!) at the beginning and made it a simple Hyperlink, and claat export worked.

This is a shame though since this exact URL and method worked with previous releases of claat, not sure what changed. :( 

--
You received this message because you are subscribed to a topic in the Google Groups "codelab-authors" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codelab-authors/g20Sq2-1KOQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codelab-autho...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/codelab-authors/6210d3af-508a-47ea-8090-ba665470a74dn%40googlegroups.com.

Edward Ost

unread,
Jun 21, 2023, 1:13:40 PM6/21/23
to codelab-authors
I had the same issue.  It is especially a shame since I like to do most of my stuff in markdown rather than html.  So for me it just pollutes the simplicity of markdown.  Did you file an issue on the codelab github?  Happy to do so but don't want to create a redundant one.

Edward Ost

unread,
Jun 21, 2023, 1:18:45 PM6/21/23
to codelab-authors
Here is a link to the issue issue which already existed 624

Marc Cohen

unread,
Jun 21, 2023, 1:21:04 PM6/21/23
to Edward Ost, codelab-authors
I'll take a look...

You received this message because you are subscribed to the Google Groups "codelab-authors" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codelab-autho...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/codelab-authors/c5215ef2-e4ca-49f0-ae1f-e105deba2e5en%40googlegroups.com.


--
Marc Cohen (he/him)
Web: mco.dev

Q: Why is this email three sentences or less?
Reply all
Reply to author
Forward
0 new messages