mysteryengineer / reddit-downloader

Download all the pictures/videos posts from a particular user on Reddit.
MIT License
32 stars 1 forks source link

exec /usr/local/bin/reddit-dl: no such file or directory #4

Closed rlitsetorp closed 6 months ago

rlitsetorp commented 6 months ago

You get this error message via Docker since the latest image:

"exec /usr/local/bin/reddit-dl: no such file or directory"

vegidio commented 6 months ago

What command are you executing? I just ran a test and it seems to be working for me.

rlitsetorp commented 6 months ago

docker run --rm -t -e REDDIT_SOURCE=user -e REDDIT_NAME=randomusername -e REDDIT_EXTENSIONS=jpg,jpeg,png -v "C:\test:/tmp/reddit" ghcr.io/mysteryengineer/reddit-downloader

I also tried without the new REDDIT_EXTENSIONS, same issue.

I see now that it stoped working in 23.12.17 image, 23.12.16 is working fine. Do i miss something obvious?

vegidio commented 6 months ago

No, your command is correct.

I did some investigation and it looks like I was relying too much on Go's cross platform build features and for some reason the Docker image for architecture ARM64 was working, but it wasn't working for AMD64 😛

Please try again with version 24.1.3 and let me know if it works now.

rlitsetorp commented 6 months ago

Nice done! Now it works as it should, thank you :)

Also, i found that some users is generating an error when its about to download, and it does even if i dont specify filetype to download:

Collecting files from user Parlax76 ....panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]: main.GetMedias.func1({{{0xc000403de0, 0x8}, {0xc000403dc6, 0xa}, {0xc0000a45d0, 0x25}, {0x0, 0x0}, 0x6365629b, 0x1, ...}})
/home/runner/work/reddit-downloader/reddit-downloader/submissions.go:55 +0x3bf reflect.Value.call({0x7d95c0?, 0x8b5950?, 0x4c?}, {0x85cb4e, 0x4}, {0xc0001dd2a0, 0x1, 0xc0001dd1a8?}) /opt/hostedtoolcache/go/1.21.5/x64/src/reflect/value.go:596 +0xce7 reflect.Value.Call({0x7d95c0?, 0x8b5950?, 0x0?}, {0xc0001dd2a0?, 0x1?, 0xc00022a500?}) /opt/hostedtoolcache/go/1.21.5/x64/src/reflect/value.go:380 +0xb9 github.com/thoas/go-funk.mapSlice({0x7ce220?, 0xc000324960?, 0x0?}, {0x7d95c0?, 0x8b5950?, 0x73a740?}) /home/runner/go/pkg/mod/github.com/thoas/go-funk@v0.9.3/transform.go:152 +0x585 github.com/thoas/go-funk.mapFn({0x7ce220, 0xc000324960}, {0x7d95c0?, 0x8b5950}, {0x860437, 0x7}) /home/runner/go/pkg/mod/github.com/thoas/go-funk@v0.9.3/transform.go:255 +0x1d7 github.com/thoas/go-funk.FlatMap({0x7ce220?, 0xc000324960?}, {0x7d95c0?, 0x8b5950?}) /home/runner/go/pkg/mod/github.com/thoas/go-funk@v0.9.3/transform.go:265 +0x34 main.GetMedias({0xc000028056, 0x4}, {0xc000028024, 0x8}, 0xf4240) /home/runner/work/reddit-downloader/reddit-downloader/submissions.go:49 +0x5e5 main.startJob({0x85e380, 0x6}, {0xc000028056, 0x4}, {0xc000028024, 0x8}, {0xc00015e2e8, 0x14}, 0xc000157b40?, 0xf4240, ...) /home/runner/work/reddit-downloader/reddit-downloader/main.go:215 +0x19e main.main.func5(0xc0001288c0) /home/runner/work/reddit-downloader/reddit-downloader/main.go:156 +0x24f github.com/urfave/cli/v2.(Command).Run(0xc000216420, 0xc0001288c0, {0xc00011a0f0, 0x3, 0x3}) /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/command.go:274 +0x998 github.com/urfave/cli/v2.(App).RunContext(0xc000232000, {0x9283c8?, 0xc253c0}, {0xc00011a0f0, 0x3, 0x3}) /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:332 +0x5b7 github.com/urfave/cli/v2.(*App).Run(...) /home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.25.7/app.go:309 main.main() /home/runner/work/reddit-downloader/reddit-downloader/main.go:183 +0xf66

Should i open another issue for this?

vegidio commented 6 months ago

Thanks for the report; there was a bug in the code to fetch some media from galleries.

Please test with version 24.1.4 and let me know if it's working now.

rlitsetorp commented 6 months ago

Nice, its working good again 😊