question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected exception when pushing from windows

See original GitHub issue

Hi, when I try to push to a repo on windows 7 64bits I get this:

unexpected exception (run with -v for details)

Running with -v gives:

Pushing to dropbox:///test
Traceback (most recent call last):
  File "p:\anaconda\lib\site-packages\urllib3\util\timeout.py", line 124, in _validate_timeout
    float(value)
TypeError: float() argument must be a string or a number, not 'Timeout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "p:\anaconda\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "p:\anaconda\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "P:\Anaconda\Scripts\git-remote-dropbox.exe\__main__.py", line 9, in <module>
  File "p:\anaconda\lib\site-packages\git_remote_dropbox\__init__.py", line 759, in main
    helper.run()
  File "p:\anaconda\lib\site-packages\git_remote_dropbox\__init__.py", line 370, in run
    self._do_list(line)
  File "p:\anaconda\lib\site-packages\git_remote_dropbox\__init__.py", line 395, in _do_list
    refs = self._get_refs(for_push=for_push)
  File "p:\anaconda\lib\site-packages\git_remote_dropbox\__init__.py", line 652, in _get_refs
    res = self._connection().files_list_folder(loc, recursive=True)
  File "p:\anaconda\lib\site-packages\dropbox\base.py", line 715, in files_list_folder
    None,
  File "p:\anaconda\lib\site-packages\dropbox\dropbox.py", line 234, in request
    timeout=timeout)
  File "p:\anaconda\lib\site-packages\dropbox\dropbox.py", line 325, in request_json_string_with_retry
    timeout=timeout)
  File "p:\anaconda\lib\site-packages\dropbox\dropbox.py", line 409, in request_json_string
    timeout=timeout,
  File "p:\anaconda\lib\site-packages\requests\sessions.py", line 565, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "p:\anaconda\lib\site-packages\requests\sessions.py", line 518, in request
    resp = self.send(prep, **send_kwargs)
  File "p:\anaconda\lib\site-packages\requests\sessions.py", line 639, in send
    r = adapter.send(request, **kwargs)
  File "p:\anaconda\lib\site-packages\requests\adapters.py", line 438, in send
    timeout=timeout
  File "p:\anaconda\lib\site-packages\urllib3\connectionpool.py", line 588, in urlopen
    timeout_obj = self._get_timeout(timeout)
  File "p:\anaconda\lib\site-packages\urllib3\connectionpool.py", line 303, in _get_timeout
    return Timeout.from_float(timeout)
  File "p:\anaconda\lib\site-packages\urllib3\util\timeout.py", line 154, in from_float
    return Timeout(read=timeout, connect=timeout)
  File "p:\anaconda\lib\site-packages\urllib3\util\timeout.py", line 94, in __init__
    self._connect = self._validate_timeout(connect, 'connect')
  File "p:\anaconda\lib\site-packages\urllib3\util\timeout.py", line 127, in _validate_timeout
    "int, float or None." % (name, value))
ValueError: Timeout value connect was Timeout(connect=30, read=30, total=None), but it must be an int, float or None.

The only steps that I have taken were installing the program via pip (as in the instructions) and creating a file called .git-remote-dropbox.json in my home folder (inside my user profile) with the API key, then creating a test repo in my computer (not in dropbox), then running git remote add origin dropbox:///.

What could I be doing wrong?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
kylebarroncommented, Aug 14, 2017

Steps to Reproduce:

I created a new Google Cloud instance running Ubuntu 16.04 LTS.

I then installed the Python 3.6 version of Anaconda:

wget https://repo.continuum.io/archive/Anaconda3-4.4.0-Linux-x86_64.sh
bash Anaconda3-4.4.0-Linux-x86_64.sh -b -p ~/anaconda

Then changed my path:

export PATH=~/anaconda/bin:$PATH

Installed git-remote-dropbox:

:~$ pip install git-remote-dropbox
Collecting git-remote-dropbox
  Downloading git_remote_dropbox-1.0.1-py2.py3-none-any.whl
Collecting dropbox<9,>=8.0 (from git-remote-dropbox)
  Downloading dropbox-8.0.0-py3-none-any.whl (392kB)
    100% |████████████████████████████████| 399kB 2.1MB/s 
Requirement already satisfied: six>=1.3.0 in ./anaconda/lib/python3.6/site-packages (from dropbox<9,>=8.0->git-remote-dropbox)
Requirement already satisfied: requests!=2.16.0,!=2.16.1,!=2.6.1,>=2.5.1 in ./anaconda/lib/python3.6/site-packages (from dropbox<9,>=8.0->git-remote-dropbox)
Collecting urllib3 (from dropbox<9,>=8.0->git-remote-dropbox)
  Downloading urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 3.3MB/s 
Installing collected packages: urllib3, dropbox, git-remote-dropbox
Successfully installed dropbox-8.0.0 git-remote-dropbox-1.0.1 urllib3-1.22

Then went to the app console. Selected “Create App” > “Dropbox API” > “Full Dropbox” > Name: “test-new-111” > Choose Dropbox Account: “Personal” (I also have a work Dropbox). Then clicked on “Generate Access Token” and copied and pasted that into ~/.git-remote-dropbox.json:

{
    "default": "..."
}

Then created a test git repo:

mkdir test
cd test
git init
git remote add origin "dropbox:///path/to/repo"
echo "test" >> README.md
git add README.md
git config --global user.email "barronk@mit.edu"
git config --global user.name "Kyle Barron"
git commit -m "Initial Commit"

And then was unable to push:

~/test$ git push -u origin master
error: unexpected exception (run with -v for details)
~/test$ git push -u origin master -v
Pushing to dropbox:///path/to/repo
Traceback (most recent call last):
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/util/timeout.py", line 124, in _validate_timeout
    float(value)
TypeError: float() argument must be a string or a number, not 'Timeout'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/kyle/anaconda/bin/git-remote-dropbox", line 11, in <module>
    sys.exit(main())
  File "/home/kyle/anaconda/lib/python3.6/site-packages/git_remote_dropbox/__init__.py", line 759, in main
    helper.run()
  File "/home/kyle/anaconda/lib/python3.6/site-packages/git_remote_dropbox/__init__.py", line 370, in run
    self._do_list(line)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/git_remote_dropbox/__init__.py", line 395, in _do_list
    refs = self._get_refs(for_push=for_push)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/git_remote_dropbox/__init__.py", line 652, in _get_refs
    res = self._connection().files_list_folder(loc, recursive=True)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/dropbox/base.py", line 715, in files_list_folder
    None,
  File "/home/kyle/anaconda/lib/python3.6/site-packages/dropbox/dropbox.py", line 234, in request
    timeout=timeout)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/dropbox/dropbox.py", line 325, in request_json_string_with_retry
    timeout=timeout)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/dropbox/dropbox.py", line 409, in request_json_string
    timeout=timeout,
  File "/home/kyle/anaconda/lib/python3.6/site-packages/requests/sessions.py", line 565, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/requests/sessions.py", line 518, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/requests/sessions.py", line 639, in send
    r = adapter.send(request, **kwargs)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/requests/adapters.py", line 438, in send
    timeout=timeout
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 588, in urlopen
    timeout_obj = self._get_timeout(timeout)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 303, in _get_timeout
    return Timeout.from_float(timeout)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/util/timeout.py", line 154, in from_float
    return Timeout(read=timeout, connect=timeout)
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/util/timeout.py", line 94, in __init__
    self._connect = self._validate_timeout(connect, 'connect')
  File "/home/kyle/anaconda/lib/python3.6/site-packages/urllib3/util/timeout.py", line 127, in _validate_timeout
    "int, float or None." % (name, value))
ValueError: Timeout value connect was Timeout(connect=30, read=30, total=None), but it must be an int, float or None.
0reactions
anishathalyecommented, Aug 24, 2017

Awesome! Closing the issue now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Git push over ssh fails on windows with 'the remote end ...
I've been scouring google and stackoverflow, and tried every solution I could find: Set the http.
Read more >
The system has rebooted without cleanly shutting down first
This event indicates that some unexpected activity prevented Windows from shutting down correctly. Such a shutdown might be caused by an ...
Read more >
Installation Error - An error occured when updating the ...
An error occurred while sending the request." message on every push/pull to GitHub. I am using git version 2.18.0.windows.1 and Git Credentials ...
Read more >
Error encountered while pushing to the remote repository
I'm using Visual Studio to integrate to bitbucket and I get the following error. Failed to push to the remote repository. See the...
Read more >
Troubleshooting Windows Devices: Workspace ONE ...
Use these steps to identify why a Windows update failed to push to devices. ☐Navigate to Windows Settings > Update & Security >...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found