# Upload\_with\_preprocessing.py not working anymore

**URL:** <https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181>\
**Category:** Contributing and equipment\
**Created:** [September 11, 2017, 5:38pm UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181 "2017-09-11T17:38:31Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![peewee32](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/peewee32/32/451_2.png) [@peewee32](https://forum.mapillary.com/u/peewee32)\
**Post date:** [September 11, 2017, 5:38pm UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/1 "2017-09-11T17:38:31Z")

</div>

I’ve been using this script (from a windows batch file) for about a year now (I think) but for some reason is does not seem to work anymore. I am not aware of any changes I have made (no need, it worked OK), For some reason I now get the following messages but I can nog work out how to resolve this.  
I thought that maybe my permission hash had changed but I checked and it had not. I saw that the MAPILLARY\_SIGNATURE\_HASH had changed (any idea why?) but both the old and the new did not seem te resolve the issue

Any ideas?

Traceback  
(most recent call last):

File  
“upload\_with\_preprocessing.py”, line 146, in

```
upload_token =

```

get\_upload\_token(MAPILLARY\_EMAIL, MAPILLARY\_PASSWORD)

File  
“E:\PeeWee\Bewaren\GPS\Mapillary2\lib\uploader.py”, line 136, in  
get\_upload\_token

```
resp = json.loads(response.read())

```

File  
“C:\Python27\lib\json\__init_\_.py”, line 339, in loads

```
return _default_decoder.decode(s)

```

File  
“C:\Python27\lib\json\decoder.py”, line 364, in decode

```
obj, end = self.raw_decode(s, idx=_w(s,

```

0).end())

File  
“C:\Python27\lib\json\decoder.py”, line 382, in raw\_decode

```
raise ValueError("No JSON object could

```

be decoded")

ValueError:  
No JSON object could be decoded

Press any  
key to continue . . .

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [September 12, 2017, 7:48am UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/2 "2017-09-12T07:48:36Z")

</div>

Have you updated to the latest version? A few days ago the script was updated to use API v2 instead of v1. They may have taken API v1 down which explains the error.

---

<div class="post-metadata">

**Author:** ![peewee32](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/peewee32/32/451_2.png) [@peewee32](https://forum.mapillary.com/u/peewee32)\
**Post date:** [September 12, 2017, 10:10am UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/3 "2017-09-12T10:10:37Z")

</div>

Thanks a lot. That seemed to be the problem. 👍

---

<div class="post-metadata">

**Author:** ![eneerhut](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/eneerhut/32/1011_2.png) [@eneerhut](https://forum.mapillary.com/u/eneerhut)\
**Post date:** [September 12, 2017, 11:28am UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/4 "2017-09-12T11:28:33Z")

</div>

Thanks as always @tryl

---

<div class="post-metadata">

**Author:** ![ligfietser](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/ligfietser/32/917_2.png) [@ligfietser](https://forum.mapillary.com/u/ligfietser)\
**Post date:** [October 18, 2017, 5:16pm UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/5 "2017-10-18T17:16:58Z")

</div>

I have now installed the latest python scripts and can’t upload my photos anymore.  
There is a message displayed “no handlers could be found for logger “exifreader””

The command in a batch file is  
python upload\_with\_preprocessing.py --remove\_duplicates --cutoff\_time 300 --cutoff\_distance 500 --auto\_done %DIR%

What can I do to solve this?

PS:  
I submitted this issue with more info on [https://github.com/mapillary/mapillary\_issues/issues/2749](https://github.com/mapillary/mapillary_issues/issues/2749)

---

<div class="post-metadata">

**Author:** ![tryl](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/tryl/32/62_2.png) [@tryl](https://forum.mapillary.com/u/tryl)\
**Post date:** [October 19, 2017, 6:23am UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/6 "2017-10-19T06:23:23Z")

</div>

I think you did the right thing in submitting an issue. It sounds like a programming error to me.

---

<div class="post-metadata">

**Author:** ![ligfietser](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/ligfietser/32/917_2.png) [@ligfietser](https://forum.mapillary.com/u/ligfietser)\
**Post date:** [October 19, 2017, 2:16pm UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/7 "2017-10-19T14:16:57Z")

</div>

I noticed the mapillary scripts were a few days older than the latest. I downloaded the latest and run my script again, now with a different error:

Traceback (most recent call last):  
File “d:\foto\Mapillary\scripts\python\upload\_with\_preprocessing.py”,  
line 13, in  
from lib.exifedit import create\_mapillary\_description  
File “d:\foto\Mapillary\scripts\python\lib\exifedit.py”, line 11, in  
from PIL import Image  
ImportError: No module named PIL

What is this module PIL and where can I get it?

---

<div class="post-metadata">

**Author:** ![ligfietser](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/ligfietser/32/917_2.png) [@ligfietser](https://forum.mapillary.com/u/ligfietser)\
**Post date:** [October 19, 2017, 4:28pm UTC](https://forum.mapillary.com/t/upload-with-preprocessing-py-not-working-anymore/1181/8 "2017-10-19T16:28:16Z")

</div>

I have now installed Pillow-2.7.0.win32-py2.7.exe  
Now no import PIL error but again “No handlers could be found for logger “exifread””  
😩
