kitovu-bot / kitovu

OpenHSR Connect 2
GNU General Public License v3.0
5 stars 2 forks source link

Weird issue with space at the end of filename (probably) #72

Open lroellin opened 5 years ago

lroellin commented 5 years ago
Downloading Programming Languages and Formal Methods HS2018/01 - 17. September - 23. September/Logicomix: An Epic Search for Truth /Logicomix An Epic Search for Truth .html
Traceback (most recent call last):
  File "/usr/local/bin/kitovu", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/kitovu/cli.py", line 56, in sync
    syncing.start_all(config)
  File "/usr/local/lib/python3.6/site-packages/kitovu/sync/syncing.py", line 51, in start_all
    _start(connection_name, connection_settings)
  File "/usr/local/lib/python3.6/site-packages/kitovu/sync/syncing.py", line 72, in _start
    _sync_subject(subject, plugin, cache)
  File "/usr/local/lib/python3.6/site-packages/kitovu/sync/syncing.py", line 97, in _sync_subject
    _sync_path(remote_full_path, local_dir, remote_dir, plugin, cache)
  File "/usr/local/lib/python3.6/site-packages/kitovu/sync/syncing.py", line 138, in _sync_path
    os.utime(local_full_path, (local_full_path.stat().st_atime, mtime))
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1156, in stat
    return self._accessor.stat(self)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 387, in wrapped
    return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/lroellin/Dropbox/HSR/Sync/PrfM/01 - 17. September - 23. September/Logicomix_ An Epic Search for Truth /Logicomix An Epic Search for Truth .html'

To reproduce,

  1. add the following to your subjects:
    - name: PrfM
    sources:
      - connection: moodleskripte
        remote-dir: Programming Languages and Formal Methods HS2018
  2. Do kitovu sync

    I'm thinking it is the space at the end of the filename, but I could be very wrong! I still wanted to give the issue a descriptive subject ;) Feel very free to change it once we found the true culprit.