kartaview / upload-scripts

Uploader tools for KartaView
MIT License
59 stars 30 forks source link

Unable to upload photos by exif using the Docker image #52

Closed n76 closed 6 years ago

n76 commented 6 years ago

I have tried the following where the photos I would like to upload are in the ~/Desktop/2018_0522_140959_887/ folder/directory:

> docker run -it --rm -v 2018_0522_140959_887/ openstreetcam/upload_photos_by_exif
> docker run -it --rm -v 2018_0522_140959_887/:/data openstreetcam/upload_photos_by_exif
> docker run -it --rm -v /Users/n76/Desktop/2018_0522_140959_887/ openstreetcam/upload_photos_by_exif
> docker run -it --rm -v "/Users/n76/Desktop/2018_0522_140959_887/:/data" openstreetcam/upload_photos_by_exif
> docker run -it --rm -v /Users/n76/Desktop/2018_0522_140959_887 openstreetcam/upload_photos_by_exif

The second one fails on the CLI as Macintoshes don't support a ":" in a file path. All of the others end up giving me the prompt of the form (the oauth_token string is different each time):

For login go to this URL in your browser:
http://www.openstreetmap.org/oauth/authorize?oauth_token=RAHZAWTVlQcaURbTT7mx6s9dUgm8Qb5T7u3Abv6A
Login and  grant acces then press ENTER

I open a browser where I am logged into OSM, paste the URL and authorize. I get a message on my browser that "You have granted application OpenStreetCam access to your account."

I go back to the terminal and press enter. After a delay, I get the following:

"Decoder failed to handle oauth_token with data as returned by provider. A different decoder may be needed. Provider returned: b''"
ERROR LOGIN no GRANT ACCES

What am I doing wrong?

And, by the way, "Login and grant acces then press ENTER" should be changed to "Login and grant access then press ENTER".

bogdans-telenav commented 6 years ago

@n76 OSM changed some OAuth related things. We are trying to figure it out on mobile and after that we will fix it also on the upload scripts client. Firstly the request should be using https not http.

cliffordsnow commented 6 years ago

I'm new to trying to upload photo's. I'm getting the same failure. Is there a workaround?

n76 commented 6 years ago

Seems like neither the scripts nor the Docker image have been updated in quite a while.

My "workaround" was to submit my photos to Mapillary. . .

cliffordsnow commented 6 years ago

Mapillary upload is also broke https://github.com/mapillary/mapillary_tools/issues/236

bogdans-telenav commented 6 years ago

Fixed. It was related to a change in the OSM OAuth service.

n76 commented 6 years ago

Doesn't look fixed to me:

MacBook-Pro:2018_0522_140959_887 $ docker run -it --rm -v '/Users/obfuscated/Desktop/OSC_Test/2018_0522_140959_887:/data' openstreetcam/upload_photos_by_exif

For login go to this URL in your browser:
http://www.openstreetmap.org/oauth/authorize?oauth_token=7sShZwtkcYCemCKtLDA2aPiLGIZLpdXKs9PEl2wW
Login and  grant acces then press ENTER

"Decoder failed to handle oauth_token with data as returned by provider. A different decoder may be needed. Provider returned: b''"
ERROR LOGIN no GRANT ACCES
MacBook-Pro:2018_0522_140959_887 $ 
n76 commented 6 years ago

When I try to use the scripts directly, not in a Docker image, it seems to get past the AUTH/login step. The script finishes almost instantly with no error messages and no logging/status updates. And when I log into OpenStreetView it does not show any photos as having been uploaded or in progress for upload.

Is this the same problems or a different one?

In any case, it looks like you need to update your Docker image to use the correction on the OSM login/authorization.