Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format yaml cause panic #96

Open
cesaryuan opened this issue Jul 30, 2024 · 0 comments
Open

Format yaml cause panic #96

cesaryuan opened this issue Jul 30, 2024 · 0 comments

Comments

@cesaryuan
Copy link

version

https://github.com/natesales/q version 0.19.2 (0ca9b8b13fc69121144d85365c16b3e21508ffc3 2024-01-21T21:16:52Z)

error

(base) PS C:\Users\Cesar> q google.com /f yaml
panic: cannot marshal type: func() time.Time [recovered]
        panic: cannot marshal type: func() time.Time

goroutine 1 [running]:
gopkg.in/yaml%2ev3.handleErr(0xc00013b4a8)
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/yaml.go:294 +0x6d
panic({0x1395b60?, 0xc0002cdcd0?})
        /opt/hostedtoolcache/go/1.21.5/x64/src/runtime/panic.go:914 +0x21f
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x13974a0?, 0xc0001b0350?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:182 +0x9a5
gopkg.in/yaml%2ev3.(*encoder).structv.func1()
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:235 +0x217
gopkg.in/yaml%2ev3.(*encoder).mappingv(0xc000100c00, {0x0?, 0x0}, 0xc000139ef8)
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:265 +0x14a
gopkg.in/yaml%2ev3.(*encoder).structv(0xc000100c00, {0x0, 0x0}, {0x1439220?, 0xc0001b0340?, 0x134f505?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:219 +0xe5
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x1439220?, 0xc0001b0340?, 0xf85588?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:168 +0x8a8
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x14212e0?, 0xc0001761f0?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:166 +0x82f
gopkg.in/yaml%2ev3.(*encoder).structv.func1()
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:235 +0x217
gopkg.in/yaml%2ev3.(*encoder).mappingv(0xc000100c00, {0x0?, 0x0}, 0xc00013a4d8)
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:265 +0x14a
gopkg.in/yaml%2ev3.(*encoder).structv(0xc000100c00, {0x0, 0x0}, {0x141bb60?, 0xc0001761e0?, 0x6?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:219 +0xe5
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x141bb60?, 0xc0001761e0?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:168 +0x8a8
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x13ba400?, 0xc0001761e0?, 0x134f505?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:166 +0x82f
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x13c23e0?, 0xc00010b610?, 0xf85588?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:162 +0x785
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x1388560?, 0xc0001f2d68?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:166 +0x82f
gopkg.in/yaml%2ev3.(*encoder).structv.func1()
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:235 +0x217
gopkg.in/yaml%2ev3.(*encoder).mappingv(0xc000100c00, {0x0?, 0x0}, 0xc00013ada8)
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:265 +0x14a
gopkg.in/yaml%2ev3.(*encoder).structv(0xc000100c00, {0x0, 0x0}, {0x1412fa0?, 0xc0001f2d20?, 0x13db4c0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:219 +0xe5
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x1412fa0?, 0xc0001f2d20?, 0xc000155410?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:168 +0x8a8
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x13c6220?, 0xc00010c338?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:166 +0x82f
gopkg.in/yaml%2ev3.(*encoder).slicev(0xc000100c00, {0x0?, 0x0}, {0x138f8e0?, 0xc000116d80?, 0x0?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:281 +0x1c7
gopkg.in/yaml%2ev3.(*encoder).marshal(0xc000100c00, {0x0, 0x0}, {0x138f8e0?, 0xc000116d80?, 0xc00013b428?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:170 +0x857
gopkg.in/yaml%2ev3.(*encoder).marshalDoc(0xc000100c00, {0x0, 0x0}, {0x138f8e0?, 0xc000116d80?, 0x1?})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/encode.go:105 +0x12e
gopkg.in/yaml%2ev3.Marshal({0x138f8e0, 0xc000116d80})
        /home/runner/go/pkg/mod/gopkg.in/yaml.v3@v3.0.1/yaml.go:222 +0x308
github.com/natesales/q/output.Printer.PrintStructured({{0x14f0600, 0xc00010c020}, 0x17de960, 0x0, 0x0}, {0xc00010c338?, 0x0?, 0x0?})
        /home/runner/work/q/q/output/structured.go:24 +0x1d1
main.driver({0xc000120050?, 0x60?, 0x0?}, {0x14f0600, 0xc00010c020})
        /home/runner/work/q/q/main.go:487 +0x1d55
main.main()
        /home/runner/work/q/q/main.go:497 +0x5f

OS

Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant