Repository: iterative/dvc

Issue:
Issue with dvc push to AWS s3 remote
**Please provide information about your setup**
DVC version(i.e. `dvc --version`), Platform and method of installation (pip, homebrew, pkg Mac, exe (Windows), DEB(Linux), RPM(Linux))

DVC: 0.62.1
Mac: Mojave 10.13
Install with pip

issue with `dvc push`


![image](https://user-images.githubusercontent.com/8621935/66682880-fc77c500-ec2a-11e9-9c37-6e276bca005a.png)



Discussion:
Hi @jonhilgart22 ! Could you show `dvc version`(note, it is not the same as `dvc --version`) output please?
![image](https://user-images.githubusercontent.com/8621935/66685343-14524780-ec31-11e9-896c-a1205f585e64.png)

@jonhilgart22 Thanks! And could you show `dvc push -v` output, please?
![image](https://user-images.githubusercontent.com/8621935/66685441-65fad200-ec31-11e9-90f4-5d6708eaac08.png)

![image](https://user-images.githubusercontent.com/8621935/66685449-6d21e000-ec31-11e9-9329-cbcb61c21aff.png)

@jonhilgart22 And `pip freeze | grep tqdm` please?
![image](https://user-images.githubusercontent.com/8621935/66685558-c0942e00-ec31-11e9-9955-27de5d80b95f.png)

Weird - I just tried `dvc push` again and it worked.
@jonhilgart22 Hm, just like that? O_o You've done nothing else and it started working?
yep! strange
@jonhilgart22 Maybe you've updated python or something recently? We've seen some flukes like that when virtualenv breaks after updating a python.
Not sure but thanks for the help!
Alright, I'm running into this issue again.

I've installed DVC inside of a pipenv.


![image](https://user-images.githubusercontent.com/8621935/66968269-23723480-f039-11e9-8ac4-9a28bc5611ae.png)

![image](https://user-images.githubusercontent.com/8621935/66968280-3422aa80-f039-11e9-9d54-77aec055ce8e.png)


Hi @casperdcl ! Seems to be related to tqdm. Maybe you have some ideas? :slightly_smiling_face: 
@jonhilgart22 can you run `tqdm --version` in the pipenv too?
tqdm=4.36.1
I wonder if this is some sort of edge case with `=` in the filenames or something similar. The best way to debug this would be if @jonhilgart22 could patch `tqdm/std.py` and post the error output.

```diff
diff --git a/tqdm/std.py b/tqdm/std.py
index 8c73c8f..9d9938b 100644
--- a/tqdm/std.py
+++ b/tqdm/std.py
@@ -466,7 +466,10 @@ class tqdm(Comparable):
                 bar_format = "{l_bar}{bar}{r_bar}"
 
             full_bar = FormatReplace()
-            nobar = bar_format.format(bar=full_bar, **format_dict)
+            try:
+                nobar = bar_format.format(bar=full_bar, **format_dict)
+            except:
+                raise KeyError(bar_format + "<-" + str(format_dict))
             if not full_bar.format_called:
                 # no {bar}, we can just format and return
                 return nobar
```
or
`pip install --force-reinstall git+https://github.com/tqdm/tqdm.git@bar_format_bug#egg=tqdm`
after 

`pip install --force-reinstall git+https://github.com/tqdm/tqdm.git@bar_format_bug#egg=tqdm`


I see this.

![image](https://user-images.githubusercontent.com/8621935/67039789-ee1c2400-f0d6-11e9-9d8a-717361b41f68.png)


Resolving patch:
diff --git a/dvc/progress.py b/dvc/progress.py
--- a/dvc/progress.py
+++ b/dvc/progress.py
@@ -114,5 +114,11 @@ def format_dict(self):
         d = super(Tqdm, self).format_dict
         ncols = d["ncols"] or 80
         ncols_desc = ncols - len(self.format_meter(ncols_desc=1, **d)) + 1
-        d["ncols_desc"] = max(ncols_desc, 0)
+        ncols_desc = max(ncols_desc, 0)
+        if ncols_desc:
+            d["ncols_desc"] = ncols_desc
+        else:
+            # work-around for zero-width desc
+            d["ncols_desc"] = 1
+            d["desc"] = 0
         return d


Test patch: