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.

IndexError when cloning on Windows 10

See original GitHub issue

On Windows 10, pushing a newly created repo as per the instructions in the wiki produces no errors. However when cloning that repo back, I get the following error

C:\Users\Iyed                                                                                                                    
(base) λ git clone "dropbox:///git-private/testing" -b develop -v                                                                
Cloning into 'testing'...                                                                                                        
debug: fetching: /git-private/testing/refs/heads/develop                                                                         
debug: fetching: /git-private/testing/objects/8a/51430a4f49cb5458f45b57f30d4d3a53d71a0b                                          
debug: fetching: /git-private/testing/objects/35/eecda6084a7aba050a7cc9aaee3f74f6c3545c                                          
debug: fetching: /git-private/testing/objects/27/de6b78d48cb8d1505670269c029737410da9d5                                          
debug: fetching: /git-private/testing/objects/04/3d4e39c02c8fff4a58b4c4f68f63f02f90618b                                          
debug: missing part of history from 4b825dc642cb6eb9a060e54bf8d69288fbee4904                                                     
Traceback (most recent call last):                                                                                               
  File "c:\users\iyed\miniconda3\lib\runpy.py", line 193, in _run_module_as_main                                                 
    "__main__", mod_spec)                                                                                                        
  File "c:\users\iyed\miniconda3\lib\runpy.py", line 85, in _run_code                                                            
    exec(code, run_globals)                                                                                                      
  File "C:\Users\Iyed\Miniconda3\Scripts\git-remote-dropbox.exe\__main__.py", line 9, in <module>                                
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 812, in main                            
    helper.run()                                                                                                                 
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 375, in run                             
    self._do_fetch(line)                                                                                                         
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 422, in _do_fetch                       
    self._fetch(sha)                                                                                                             
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 634, in _fetch                          
    queue.extend(git_referenced_objects(sha))                                                                                    
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 226, in git_referenced_objects          
    return [line.split()[2] for line in lines if not line.startswith('160000 commit ')]                                          
  File "c:\users\iyed\miniconda3\lib\site-packages\git_remote_dropbox\__init__.py", line 226, in <listcomp>                      
    return [line.split()[2] for line in lines if not line.startswith('160000 commit ')]                                          
IndexError: list index out of range                                                                                              

I am using:

  • Windows 10
  • Python 3.7.1,
  • dropbox==9.3.0
  • git-remote-dropbox==1.0.8
  • requests=2.21.0=py37_0

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
anishathalyecommented, Sep 2, 2020

A quick update: figured out the bug, it shows up on Git versions before https://github.com/git/git/commit/f06ab027efd2cff4c4319354f1ad7d5f09e853a1 (so the latest release that works fine in this situation is v2.22.0). It has to do with the empty tree being in the commit history, so it should be pretty rare. There is also no data loss as a result of this, just a crash when cloning.

As a workaround, you can upgrade your installed git, and it should start working again. I should have a patch for this soon once I figure out the cleanest way to do it.

1reaction
martin-prcommented, Aug 30, 2020

I am on Ubuntu 19.10, with Python 3.7.5 and git-remote-dropbox 1.1.2 installed through pip.

The repo I am having a problem with is my home page, and is about 180MB of data. While there is nothing too secret about it, I’d feel better sharing it through a private message, if thats ok.

Edit: I’ve just shared the problematic dropbox folder with you on your @mit.edu address.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I have a problem with Windows 10 Search Indexing
When I go into Control Panel's Search Indexing screen, and click the Modify button which brings up the 'Indexed Locations' window and then...
Read more >
Sourcetree Windows fails to clone a private Hg hos...
Dear all, I am currently using Sourcetree 3.0.6-beta-2193 (the latest, it seems) on Windows 10 1709, with both embedded Git (2.18.0/LibGit2Sharp.
Read more >
Why does Windows Search "Indexing Options" select the ...
I cloned a Windows 10 HDD to a Samsung SSD using "Samsung Data Migration Software", then installed a fresh copy of Windows 10...
Read more >
IndexError: list index out of range when using variable
IndexError : list index out of range when using variable. 215. 4. Jump to solution. 08-10-2022 06:38 AM. WhitneyWeber. by WhitneyWeber.
Read more >
git clone fails with "index-pack" failed? - Stack Overflow
This worked for me on windows 10 within the standard command shell (cmd.exe). Just clicked the window icon, Edit->Mark and selected some text....
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