sephii / taxi

Taxi is a CLI to time tracking backends
https://taxi-timesheets.readthedocs.io/
Do What The F*ck You Want To Public License
41 stars 15 forks source link

taxi edit error on Windows 10 since version 6.1.0 #141

Closed Seeow closed 3 years ago

Seeow commented 3 years ago

Since version 6.1.0 I have this error with the taxi edit command on Windows 10:

Traceback (most recent call last):
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\taxi-script.py", line 33, in <module>
    sys.exit(load_entry_point('taxi==6.1.0', 'console_scripts', 'taxi')())
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\click\decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\taxi\commands\edit.py", line 43, in edit
    t.save()
  File "C:\Users\Jason\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\taxi\timesheet\timesheet.py", line 112, in save
    os.replace(temp_timesheet_file.name, file_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\Jason\\zebra\\2021\\taxiu1ilq_ib' -> 'C:\\Users\\Jason/zebra/2021/09.tks'

Rolled back to previous version for now.

sephii commented 3 years ago

Thanks for the bug report. Could you please try the development version and let me know if you’re getting the same error? You should be able to install it with the following commands:

python3 -m venv testenv
./testenv/bin/python -m pip install git+https://github.com/sephii/taxi git+https://github.com/liip/taxi-zebra
./testenv/bin/taxi edit
Seeow commented 3 years ago

Yes it works! Thanks

sephii commented 3 years ago

The fix has been released in 6.1.1.