kshitij-raj-sharma / OSMSG-stats

OSM Stats Generator Command Line - Stats
https://osmsg-stats.streamlit.app/
MIT License
26 stars 6 forks source link

Not able to download the data #17

Closed Patrik-Br closed 1 year ago

Patrik-Br commented 1 year ago

I am running windows, using the OSMSG script over Anaconda Navigator. I am not able to download the data because it stops the process giving me "TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond". image . . . .

image

It might be my slow internet (my download speed is about 9.5 Mbps) and the source website https://planet.openstreetmap.org says "WARNING Download speeds are currently restricted to 4096 KB/s due to limited available capacity on our Internet connection. Please use torrents or a mirror if possible." image

kshitijrajsharma commented 1 year ago

Hi @Patrik-Br , Thanks ! Can you pass command that you are using ? I will love to reproduce the issue

Patrik-Br commented 1 year ago

My apologise, I forgot to write it there.

osmsg --username MyUsername --password MyPaSsWoRd --last_week --changeset --charts --name _TEST --users Patrik_B

Statistics for my account for the last week.

kshitijrajsharma commented 1 year ago

On normal usage of OSMSG username and password is not required ,It will only be required if you use Geofabrik ! Now coming back to your command , If you are looking to extract your user stats you don't need to include --changeset option either , --changeset option will give you info about hashtags , editors and countries , Mostly for user stats you may not need them . Totally depends upon your usecase You can try visualizing the user stats first

osmsg --last_week --charts --name patrik_stats --users Patrik_B

if you are trying to extract for a week : you can use --url day or --url hour so that you will be only downloading 7 files for a week using day and respective for hour ! this will avoid downloading huge chunk of minute files

It takes 9 min in my machine to process a week data !

Patrik-Br commented 1 year ago

I just tried the osmsg --last_week --charts --name patrik_stats --users Patrik_B command, turned on stopwatches and after about 3 and half minutes it got to 28% and then gave me the Windows error

image image

Then I tried the same command again, it started where it ended, so 28%, it got to 30% in about 30 seconds and then stopped again. So probably if I will keep repeating it it will fully download everything. Hmmm will give it a shot later on, I have to go now

Patrik-Br commented 1 year ago

After running the command multiple times I was able to get the results image

kshitijrajsharma commented 1 year ago

Thanks @Patrik-Br , Your contribution is highly valued ! You can Install latest version of osmsg, it has multiple fixes ! I will do something about network issue , may be I can make script wait until connects becomes alive or increase max retries , I am brainstorming !