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

divide by 0 error during bootstrap (Intel Mac, GitHub release download) #207

Open
restena-sw opened this issue Dec 13, 2023 · 2 comments
Open

Comments

@restena-sw
Copy link

restena-sw commented Dec 13, 2023

This happens with the Github-downloaded binary on an Intel Mac:

swinter@Stefans-MacBook-Pro tx-darwin-amd64 % ./tx init

Successful creation of '.tx/config' file
swinter@Stefans-MacBook-Pro tx-darwin-amd64 % ./tx pull
API token not found. Please provide it and it will be saved in '~/.transifexrc'.
If you don't have an API token, you can generate one in https://app.transifex.com/user/settings/api/
> 1/...
# Getting info about resources

panic: runtime error: integer divide by zero

goroutine 1 [running]:
github.com/transifex/cli/pkg/worker_pool.makeProgressBar(0x0, 0x0, 0xc00006c720, 0xc0001d2b00)
	/home/runner/work/cli/cli/pkg/worker_pool/main.go:249 +0x217
github.com/transifex/cli/pkg/worker_pool.(*Pool).Start(0xc0001d2b00)
	/home/runner/work/cli/cli/pkg/worker_pool/main.go:228 +0x325
github.com/transifex/cli/internal/txlib.PullCommand(0xc0001d4490, 0xc0001066c0, 0xc0001c6460, 0x0, 0x0)
	/home/runner/work/cli/cli/internal/txlib/pull.go:64 +0x41d
github.com/transifex/cli/cmd/tx.Main.func5(0xc0001d2980, 0x14, 0x28)
	/home/runner/work/cli/cli/cmd/tx/main.go:618 +0xd79
github.com/urfave/cli/v2.(*Command).Run(0xc0001c4000, 0xc0001d2180, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/command.go:163 +0x4dd
github.com/urfave/cli/v2.(*App).RunContext(0xc00007ba00, 0x1755dc0, 0xc000026080, 0xc00001e040, 0x2, 0x2, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:313 +0x810
github.com/urfave/cli/v2.(*App).Run(...)
	/home/runner/go/pkg/mod/github.com/urfave/cli/v2@v2.3.0/app.go:224
github.com/transifex/cli/cmd/tx.Main()
	/home/runner/work/cli/cli/cmd/tx/main.go:1055 +0x2cfa
main.main()
	/home/runner/work/cli/cli/main.go:5 +0x25
@Socolin
Copy link

Socolin commented Feb 29, 2024

I got the same, fixed by manually providing the config file with at least 1 resource

@rffontenelle
Copy link

rffontenelle commented May 8, 2024

This panic: runtime error: integer divide by zero seems to happen when .tx/config has zero resources.

It would be nice to have a better, more descriptive message.

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

3 participants