Skip to content

Panic #1

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

Open
aamaanaa opened this issue Apr 26, 2025 · 1 comment
Open

Panic #1

aamaanaa opened this issue Apr 26, 2025 · 1 comment

Comments

@aamaanaa
Copy link

aamaanaa commented Apr 26, 2025

panic: open ./downloads/dbip-city-ipv4.csv: no such file or directory

goroutine 6 [running]:
main.loadCities({{{0xa9dfcc, 0x9}, {0xa9c109, 0x2}, {0xa9c3e1, 0x4}, {0xaacb87, 0x22}, {0xc0000235c0, 0x1, ...}}, ...})
	F:/Code/Go/ip-location-api/load.go:51 +0x7b9
main.loadData({0xc000602700?, 0x2?, 0x2?})
	F:/Code/Go/ip-location-api/load.go:41 +0xf8
main.upgrade({0xc0002fa840?, 0x0?, 0x0?})
	F:/Code/Go/ip-location-api/main.go:77 +0x25
created by main.initialise in goroutine 1
	F:/Code/Go/ip-location-api/main.go:48 +0xc7

also the F:/Code/Go/ip-location-api is not a path that exist in my pc, i gues this is debugging info from your pc

EDIT

seems there is a issue with the downloader. the files are not dbip-city-ipv4.csv but dbip-city-ipv4.csv.gz in the repo, so i manually extracted them to the folder

@paul-norman
Copy link
Owner

I'll have to take a look into this later on today. For that database, the file should be downloaded as a gzipped version (see download.go) and then immediately decompressed. It seems that the decompression didn't work if there was a .gz file, but no .csv file in the download folder (or the download didn't work if there was no file at all).

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

2 participants