Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset deleted files fails when file is deleted from remote and local directory prior to running gitpuller #234

Open
paulkm opened this issue Nov 18, 2021 · 3 comments
Labels

Comments

@paulkm
Copy link

paulkm commented Nov 18, 2021

Bug description

When a file is deleted from both the git remote and the local directory, nbgitpuller cannot run successfully.

Expected behaviour

nbgitpuller should ignore files deleted locally if they've also been deleted from the remote.

Actual behaviour

paul@local:  git rm testfile2.txt
paul@local:  git commit -m "deleted file2" && git push
...
jovyan@jupyter-paulkm:~$ rm sandbox/testfile2.txt 
jovyan@jupyter-paulkm:~$ gitpuller https://github.com/paulkm/sandbox.git master sandbox
$ git fetch

From https://github.com/paulkm/sandbox

   47b9206..36d0a4d  master     -> origin/master

$ git checkout origin/master -- testfile2.txt

error: pathspec 'testfile2.txt' did not match any file(s) known to git

Traceback (most recent call last):
  File "/opt/conda/bin/gitpuller", line 8, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 310, in main
    for line in GitPuller(
  File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 146, in pull
    yield from self.update()
  File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 263, in update
    yield from self.reset_deleted_files()
  File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 175, in reset_deleted_files
    yield from execute_cmd(['git', 'checkout', 'origin/{}'.format(self.branch_name), '--', filename], cwd=self.repo_dir)
  File "/opt/conda/lib/python3.9/site-packages/nbgitpuller/pull.py", line 45, in execute_cmd
    raise subprocess.CalledProcessError(ret, cmd)
subprocess.CalledProcessError: Command '['git', 'checkout', 'origin/master', '--', 'testfile2.txt']' returned non-zero exit status 1.

How to reproduce

  1. In Jupyter, clone a git repo, eg: gitpuller https://github.com/my_user/my_repo.git main local_dir
  2. Delete a file from the git repo and commit
  3. in Jupyter, delete the same file locally and rerun gitpuller https://github.com/my_user/my_repo.git main local_dir

Your personal set up

  • Using zero-to-jupyterhub 1.1.3
  • OS: Ubuntu 20.04.3 LTS
  • jupyter notebook version: 6.4.5
  • Python version: 3.9.7
  • nbgitpuller version: 1.0.2
Full environment
absl-py @ file:///home/conda/feedstock_root/build_artifacts/absl-py_1634676905105/work
alembic @ file:///home/conda/feedstock_root/build_artifacts/alembic_1633571415941/work
altair==4.1.0
anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1634574560717/work/dist
appdirs @ file:///home/conda/feedstock_root/build_artifacts/appdirs_1603108395799/work
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1636021379509/work
arviz @ file:///home/conda/feedstock_root/build_artifacts/arviz_1633274821480/work
asdf @ file:///home/conda/feedstock_root/build_artifacts/asdf_1611110882063/work
asteval @ file:///home/conda/feedstock_root/build_artifacts/asteval_1614435675399/work
astroalign==2.4
astroML==0.4.1
astroplan @ file:///home/conda/feedstock_root/build_artifacts/astroplan_1611677359782/work
astropy @ file:///home/conda/feedstock_root/build_artifacts/astropy_1636583264029/work
astropy-healpix @ file:///home/conda/feedstock_root/build_artifacts/astropy-healpix_1636593173844/work
astroquery==0.4.3
astroscrappy @ file:///home/conda/feedstock_root/build_artifacts/astroscrappy_1636663966871/work
async-generator==1.10
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1620387926260/work
Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1619719576210/work
backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work
backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1631087867185/work
biogeme==3.2.8
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1629908509068/work
blinker==1.4
blis @ file:///home/conda/feedstock_root/build_artifacts/cython-blis_1636053225697/work
bokeh @ file:///home/conda/feedstock_root/build_artifacts/bokeh_1634387995307/work
Bottleneck @ file:///home/conda/feedstock_root/build_artifacts/bottleneck_1636024229570/work
bounded-pool-executor==0.0.3
brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1636012194889/work
bs4==0.0.1
cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work
cachetools @ file:///home/conda/feedstock_root/build_artifacts/cachetools_1633010882559/work
catalogue @ file:///home/conda/feedstock_root/build_artifacts/catalogue_1632148432306/work
ccdproc @ file:///home/conda/feedstock_root/build_artifacts/ccdproc_1621888620156/work
certifi==2021.10.8
certipy==0.1.3
cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1636046055389/work
cftime @ file:///home/conda/feedstock_root/build_artifacts/cftime_1636280862161/work
chardet @ file:///home/conda/feedstock_root/build_artifacts/chardet_1635814836324/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1626371162869/work
choicemodels==0.2.2
click @ file:///home/conda/feedstock_root/build_artifacts/click_1635822573388/work
cloudpickle @ file:///home/conda/feedstock_root/build_artifacts/cloudpickle_1631273254894/work
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1602866480661/work
conda==4.10.3
conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1636021710069/work
coverage @ file:///home/conda/feedstock_root/build_artifacts/coverage_1636606409058/work
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography_1636040644060/work
cssselect==1.1.0
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1635519461629/work
cymem @ file:///home/conda/feedstock_root/build_artifacts/cymem_1636053151739/work
Cython @ file:///home/conda/feedstock_root/build_artifacts/cython_1635818387049/work
cytoolz==0.11.2
dask @ file:///home/conda/feedstock_root/build_artifacts/dask-core_1636395338624/work
dataclasses @ file:///home/conda/feedstock_root/build_artifacts/dataclasses_1628958434797/work
debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1636043249011/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1631346842025/work
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
descartes==1.1.0
dill @ file:///home/conda/feedstock_root/build_artifacts/dill_1623610058511/work
distributed @ file:///home/conda/feedstock_root/build_artifacts/distributed_1636426838998/work
emcee @ file:///home/conda/feedstock_root/build_artifacts/emcee_1629742678207/work
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1602701735325/work/dist/entrypoints-0.3-py2.py3-none-any.whl
et-xmlfile==1.0.1
fake-useragent==0.1.11
fastprogress @ file:///home/conda/feedstock_root/build_artifacts/fastprogress_1597932925331/work
filelock @ file:///home/conda/feedstock_root/build_artifacts/filelock_1635559102399/work
flatbuffers @ file:///home/conda/feedstock_root/build_artifacts/python-flatbuffers_1620718971772/work
fsspec @ file:///home/conda/feedstock_root/build_artifacts/fsspec_1636203345794/work
funcy==1.16
future @ file:///home/conda/feedstock_root/build_artifacts/future_1635819506105/work
fuzzywuzzy==0.18.0
gatspy==0.3
gensim @ file:///home/conda/feedstock_root/build_artifacts/gensim_1617356516453/work
gmpy2==2.1.0rc1
greenlet @ file:///home/conda/feedstock_root/build_artifacts/greenlet_1635836790477/work
gwcs @ file:///home/conda/feedstock_root/build_artifacts/gwcs_1608672787393/work
h5py @ file:///home/conda/feedstock_root/build_artifacts/h5py_1631559897874/work
HeapDict==1.0.1
hickle==3.4.5
html5lib @ file:///home/conda/feedstock_root/build_artifacts/html5lib_1592930327044/work
hypothesis @ file:///home/conda/feedstock_root/build_artifacts/hypothesis_1636993821949/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1609836280497/work
imagecodecs @ file:///home/conda/feedstock_root/build_artifacts/imagecodecs_1634654913309/work
imageio @ file:///home/conda/feedstock_root/build_artifacts/imageio_1594044661732/work
importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1636431527844/work
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1635615662634/work
iniconfig @ file:///home/conda/feedstock_root/build_artifacts/iniconfig_1603384189793/work
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1634726348630/work/dist/ipykernel-6.4.2-py3-none-any.whl
ipympl @ file:///home/conda/feedstock_root/build_artifacts/ipympl_1635168992799/work
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1635868623395/work
ipython-genutils==0.2.0
ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1631590360471/work
jax @ file:///home/conda/feedstock_root/build_artifacts/jax_1636597528243/work
jaxlib @ file:///home/conda/feedstock_root/build_artifacts/jaxlib_1636672606427/work/dist/jaxlib-0.1.73-cp39-none-manylinux2010_x86_64.whl
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1635824010494/work
jeepney @ file:///home/conda/feedstock_root/build_artifacts/jeepney_1627546597665/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1633656206378/work
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1633637554808/work
json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1600692310011/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema_1636165360877/work
jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1633454794268/work
jupyter-core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1635407112029/work
jupyter-server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1635811281209/work
jupyter-telemetry @ file:///home/conda/feedstock_root/build_artifacts/jupyter_telemetry_1605173804246/work
jupyterhub @ file:///home/conda/feedstock_root/build_artifacts/jupyterhub-feedstock_1636379424021/work
jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1636617780837/work
jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1601375948261/work
jupyterlab-server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1632590716858/work
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1631590465624/work
keyring @ file:///home/conda/feedstock_root/build_artifacts/keyring_1636761958323/work
kiwisolver @ file:///home/conda/feedstock_root/build_artifacts/kiwisolver_1635836719639/work
langcodes @ file:///home/conda/feedstock_root/build_artifacts/langcodes_1636741340529/work
llvmlite==0.37.0
lmfit @ file:///home/conda/feedstock_root/build_artifacts/lmfit_1635465361233/work
locket==0.2.0
lxml @ file:///home/conda/feedstock_root/build_artifacts/lxml_1635961960273/work
Mako @ file:///home/conda/feedstock_root/build_artifacts/mako_1629523042001/work
mamba @ file:///home/conda/feedstock_root/build_artifacts/mamba_1634161550232/work
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1635833544680/work
matplotlib @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-suite_1632416623391/work
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1631080358261/work
mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1635844679781/work
mizani==0.7.3
mock @ file:///home/conda/feedstock_root/build_artifacts/mock_1635819531655/work
more-itertools @ file:///home/conda/feedstock_root/build_artifacts/more-itertools_1636526469270/work
mpi4py @ file:///home/conda/feedstock_root/build_artifacts/mpi4py_1636126598497/work
mpmath @ file:///home/conda/feedstock_root/build_artifacts/mpmath_1612895720168/work
msgpack @ file:///home/conda/feedstock_root/build_artifacts/msgpack-python_1635831459838/work
murmurhash @ file:///home/conda/feedstock_root/build_artifacts/murmurhash_1636019597406/work
nbclassic==0.2.8
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1636373223849/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert_1632535927841/work
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1617383142101/work
nbgitpuller==1.0.2
nbresuse==0.3.3
nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1617163391303/work
netCDF4 @ file:///home/conda/feedstock_root/build_artifacts/netcdf4_1636302994507/work
networkx @ file:///home/conda/feedstock_root/build_artifacts/networkx_1635253012265/work
nltk @ file:///home/conda/feedstock_root/build_artifacts/nltk_1633955089856/work
notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1634668519289/work
numba @ file:///home/conda/feedstock_root/build_artifacts/numba_1633674389794/work
numexpr @ file:///home/conda/feedstock_root/build_artifacts/numexpr_1636286792193/work
numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1622014603188/work
oauthlib @ file:///home/conda/feedstock_root/build_artifacts/oauthlib_1622563202229/work
olefile @ file:///home/conda/feedstock_root/build_artifacts/olefile_1602866521163/work
openpyxl @ file:///home/conda/feedstock_root/build_artifacts/openpyxl_1632332968451/work
opt-einsum @ file:///home/conda/feedstock_root/build_artifacts/opt_einsum_1617859230218/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1635539860161/work
palettable==3.3.0
pamela==1.0.0
pandas==1.3.4
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
parse==1.19.0
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1617148930513/work
partd @ file:///home/conda/feedstock_root/build_artifacts/partd_1617910651905/work
pathy @ file:///home/conda/feedstock_root/build_artifacts/pathy_1635227809952/work
patsy @ file:///home/conda/feedstock_root/build_artifacts/patsy_1632667180946/work
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1602535608087/work
photutils @ file:///home/conda/feedstock_root/build_artifacts/photutils_1632442914493/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602535621604/work
Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1630696601414/work
plotly @ file:///home/conda/feedstock_root/build_artifacts/plotly_1610471242275/work
plotnine @ file:///home/conda/feedstock_root/build_artifacts/plotnine_1616675245480/work
pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1635832810452/work
pooch @ file:///home/conda/feedstock_root/build_artifacts/pooch_1633958983611/work
pqdm==0.1.0
preshed @ file:///home/conda/feedstock_root/build_artifacts/preshed_1636077708717/work
prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1635538335951/work
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1636045889479/work
protobuf==3.19.1
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1635822677294/work
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
py @ file:///home/conda/feedstock_root/build_artifacts/py_1636301881863/work
pycosat @ file:///home/conda/feedstock_root/build_artifacts/pycosat_1636020362356/work
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
pycurl==7.44.1
pydantic @ file:///home/conda/feedstock_root/build_artifacts/pydantic_1636021143633/work
pyee==8.2.2
pyerfa @ file:///home/conda/feedstock_root/build_artifacts/pyerfa_1636217368532/work
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1629119114968/work
pygpu==0.7.6
PyJWT @ file:///home/conda/feedstock_root/build_artifacts/pyjwt_1634405536383/work
pyLDAvis==3.3.1
pylogit @ file:///home/conda/feedstock_root/build_artifacts/pylogit_1609090148822/work
pymc3 @ file:///home/conda/feedstock_root/build_artifacts/pymc3_1634045232821/work
pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1633192417276/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1635267989520/work
pyppeteer==0.2.6
pyquery==1.4.3
pyrsistent @ file:///home/conda/feedstock_root/build_artifacts/pyrsistent_1636052584784/work
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1635862404942/work
pytest==6.2.5
pytest-arraydiff==0.3
pytest-astropy @ file:///home/conda/feedstock_root/build_artifacts/pytest-astropy_1632270842505/work
pytest-astropy-header==0.1.2
pytest-cov @ file:///home/conda/feedstock_root/build_artifacts/pytest-cov_1633356845954/work
pytest-doctestplus @ file:///home/conda/feedstock_root/build_artifacts/pytest-doctestplus_1632228746984/work
pytest-filter-subpackage @ file:///home/conda/feedstock_root/build_artifacts/pytest-filter-subpackage_1591393389500/work
pytest-mock @ file:///home/conda/feedstock_root/build_artifacts/pytest-mock_1620349931982/work
pytest-openfiles @ file:///home/conda/feedstock_root/build_artifacts/pytest-openfiles_1591909410901/work
pytest-remotedata @ file:///home/conda/feedstock_root/build_artifacts/pytest-remotedata_1600536992671/work
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1602545356084/work
python-mimeparse==1.6.0
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1633452062248/work
pyvo==1.1
PyWavelets @ file:///home/conda/feedstock_root/build_artifacts/pywavelets_1636446428943/work
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1636139833192/work
pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1635877397296/work
qgrid==1.3.1
regex @ file:///home/conda/feedstock_root/build_artifacts/regex_1636504149925/work
reproject @ file:///home/conda/feedstock_root/build_artifacts/reproject_1636666866798/work
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1626393743643/work
requests-html==0.10.0
retrying==1.3.3
ruamel-yaml-conda @ file:///home/conda/feedstock_root/build_artifacts/ruamel_yaml_1636009144459/work
ruamel.yaml @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml_1635932654918/work
ruamel.yaml.clib @ file:///home/conda/feedstock_root/build_artifacts/ruamel.yaml.clib_1610146844134/work
schwimmbad @ file:///home/conda/feedstock_root/build_artifacts/schwimmbad_1635862196298/work
scikit-image==0.18.3
scikit-learn @ file:///home/conda/feedstock_root/build_artifacts/scikit-learn_1635240682175/work
scipy==1.7.1
seaborn @ file:///home/conda/feedstock_root/build_artifacts/seaborn-split_1629095986539/work
SecretStorage @ file:///home/conda/feedstock_root/build_artifacts/secretstorage_1636696184946/work
selenium @ file:///home/conda/feedstock_root/build_artifacts/selenium_1636727958784/work
semantic-version @ file:///home/conda/feedstock_root/build_artifacts/semantic_version_1589368664588/work
semver @ file:///home/conda/feedstock_root/build_artifacts/semver_1603697772578/work
Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1628511208346/work
sep==1.2.0
setuptools-scm @ file:///home/conda/feedstock_root/build_artifacts/setuptools_scm_1631397603934/work
shellingham @ file:///home/conda/feedstock_root/build_artifacts/shellingham_1612179560728/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
sklearn==0.0
smart-open @ file:///home/conda/feedstock_root/build_artifacts/smart_open_1630238320325/work
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1635844660462/work
sortedcontainers @ file:///home/conda/feedstock_root/build_artifacts/sortedcontainers_1621217038088/work
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1636121574387/work
spacy @ file:///home/conda/feedstock_root/build_artifacts/spacy_1636396201990/work
spacy-legacy @ file:///home/conda/feedstock_root/build_artifacts/spacy-legacy_1625687473390/work
spacy-loggers @ file:///home/conda/feedstock_root/build_artifacts/spacy-loggers_1634809367310/work
SQLAlchemy @ file:///home/conda/feedstock_root/build_artifacts/sqlalchemy_1635913536169/work
srsly @ file:///home/conda/feedstock_root/build_artifacts/srsly_1635234058734/work
statsmodels @ file:///home/conda/feedstock_root/build_artifacts/statsmodels_1636437188955/work
sympy @ file:///home/conda/feedstock_root/build_artifacts/sympy_1636237085010/work
tables @ file:///home/conda/feedstock_root/build_artifacts/pytables_1630027046462/work
tblib @ file:///home/conda/feedstock_root/build_artifacts/tblib_1616261298899/work
terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1636052205136/work
testpath @ file:///home/conda/feedstock_root/build_artifacts/testpath_1621261527237/work
textblob==0.15.3
Theano-PyMC @ file:///home/conda/feedstock_root/build_artifacts/theano-pymc_1611363408380/work
thinc @ file:///home/conda/feedstock_root/build_artifacts/thinc_1635495430068/work
threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1633102299089/work
tifffile @ file:///home/conda/feedstock_root/build_artifacts/tifffile_1635944860688/work
toml @ file:///home/conda/feedstock_root/build_artifacts/toml_1604308577558/work
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1635181214134/work
toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1636177962100/work
torch @ file:///home/conda/feedstock_root/build_artifacts/pytorch-recipe_1610938747249/work
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1635819584296/work
tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1632160078689/work
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1635260543454/work
typer @ file:///home/conda/feedstock_root/build_artifacts/typer_1630326630489/work
typing-extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1632313171031/work
uncertainties @ file:///home/conda/feedstock_root/build_artifacts/uncertainties_1626042404254/work
Unidecode==1.3.2
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1632350318291/work
w3lib==1.22.0
wasabi @ file:///home/conda/feedstock_root/build_artifacts/wasabi_1612156086016/work
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1600965781394/work
webencodings==0.5.1
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1636032738638/work
websockets==9.1
widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1635456207915/work
xarray @ file:///home/conda/feedstock_root/build_artifacts/xarray_1636334359499/work
xlrd @ file:///home/conda/feedstock_root/build_artifacts/xlrd_1610224409810/work
zict==2.0.0
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1633302054558/work
@paulkm paulkm added the bug label Nov 18, 2021
@welcome
Copy link

welcome bot commented Nov 18, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jameshowison
Copy link

I think may be running into a similar issue. I had a file in the repo (some_csv.csv) and I no longer wanted it there. I deleted it on my JupyterHub server, then I used git rm in the source repo on my local disk and git push up to github. When I clicked the nbgitpuller link again (to demonstrate to students) I received these errors:

Screen Shot 2022-02-24 at 1 45 24 PM

Even more oddly (at least to me) this error occurred not only when hitting a link for the folder that file was deleted from, but other folders of that same repo as well.

@jameshowison
Copy link

I can confirm that having deleted this file on the Jupyter server was causing this problem (including pulling sibling directories).

I used git locally on the laptop to restore the file

git log -- some_csv.csv
git checkout 2102f23c -- some_csv.csv

and then uploaded that file into its former location in Jupyter.

I was then able to get the nbgitpuller links to work again.

jdmansour added a commit to jdmansour/nbgitpuller that referenced this issue Mar 17, 2022
jdmansour added a commit to jdmansour/nbgitpuller that referenced this issue Mar 17, 2022
Fixes issues jupyterhub#254 and jupyterhub#234.
When a deleted file is reset, this checks it out from the local copy
of the branch, rather than from the remote copy. The file might not
exist in the remote branch anymore, causing jupyterhub#234 when running
`git checkout`. If the file was conflicted before, we will run into
issue jupyterhub#254.

If the remote file has changed, it will be merged regularly afterwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants