tomy0000000 / Coinc

💰💱Alfred Workflow for currencies conversion
https://alfred.app/workflows/tomy0000000/coinc/
MIT License
56 stars 6 forks source link

[Errno 66] Directory not empty #12

Closed stevenjlho closed 3 years ago

stevenjlho commented 4 years ago

Debug Log

16:36:57 workflow.py:2061 DEBUG    ---------- Coinc (1.3.0) ----------
16:36:57 workflow.py:1468 DEBUG    reading settings from /Users/stevenjlho/Library/Application Support/Alfred/Workflow Data/tech.tomy.coinc/settings.json
16:36:57 workflow.py:2338 INFO     checking for update ...
16:36:57 background.py:222 INFO     [__workflow_update_check] job already running
16:36:57 workflow.py:2080 ERROR    [Errno 66] Directory not empty
Traceback (most recent call last):
  File "/Users/stevenjlho/Library/Mobile Documents/com~apple~CloudDocs/Backup/Alfred.alfredpreferences/workflows/user.workflow.7F48A356-AF39-4C50-A081-580CA53B13CB/workflow/workflow.py", line 2073, in run
    func(self)
  File "main.py", line 12, in main
    if coinc.utils.manual_update_patch(workflow):
  File "/Users/stevenjlho/Library/Mobile Documents/com~apple~CloudDocs/Backup/Alfred.alfredpreferences/workflows/user.workflow.7F48A356-AF39-4C50-A081-580CA53B13CB/coinc/utils.py", line 62, in manual_update_patch
    os.rename(old_path, new_path)
OSError: [Errno 66] Directory not empty
16:36:57 workflow.py:2082 INFO     for assistance, see: https://git.io/JfjXg
16:36:57 workflow.py:2103 DEBUG    ---------- finished in 0.024s ----------
[16:36:57.296] Coinc[Script Filter] {
  "items": [
    {
      "valid": false,
      "subtitle": "[Errno 66] Directory not empty",
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      },
      "title": "Error in workflow 'Coinc'"
    }
  ]
}
crazycat836 commented 4 years ago

Receive same error today

tomy0000000 commented 4 years ago

This is likely a bug happened during self upgrade, removing the folder ~/Library/Application Support/Alfred/Workflow Data/tech.tomy.coon should fix for now, patch will be release in the next update.

Please reply if this fix works, as I will be able to determine this issue can be closed.

Thanks all.

crazycat836 commented 4 years ago

After removing the folder .../tech.tomy.coon, it work without problem, thanks for such a quick processing

tomy0000000 commented 4 years ago

Closing for now. If anyone encounter the same problem and can't fix with the instructions provided, feel free to reopen the issue.

stevenjlho commented 4 years ago

After removing the folder .../tech.tomy.coon, it also show these error

08:50:22 workflow.py:2061 DEBUG    ---------- Coinc (1.3.0) ----------
08:50:22 background.py:240 DEBUG    [__workflow_update_check] background job started
08:50:22 workflow.py:2080 ERROR    [Errno 66] Directory not empty
Traceback (most recent call last):
  File "/Users/stevenjlho/Library/Mobile Documents/com~apple~CloudDocs/Backup/Alfred.alfredpreferences/workflows/user.workflow.74F5C645-0536-4E64-B821-75258589768D/workflow/workflow.py", line 2073, in run
    func(self)
  File "main.py", line 12, in main
    if coinc.utils.manual_update_patch(workflow):
  File "/Users/stevenjlho/Library/Mobile Documents/com~apple~CloudDocs/Backup/Alfred.alfredpreferences/workflows/user.workflow.74F5C645-0536-4E64-B821-75258589768D/coinc/utils.py", line 62, in manual_update_patch
    os.rename(old_path, new_path)
OSError: [Errno 66] Directory not empty
08:50:22 workflow.py:2082 INFO     for assistance, see: https://git.io/JfjXg
08:50:22 workflow.py:2103 DEBUG    ---------- finished in 0.117s ----------
[08:50:22.989] Coinc[Script Filter] {
  "items": [
    {
      "valid": false,
      "subtitle": "[Errno 66] Directory not empty",
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      },
      "title": "Error in workflow 'Coinc'"
    }
  ]
}
tomy0000000 commented 4 years ago

@stevenjlho I saw you setup the alfred preference to sync across devices with iCloud, which is not recommended.

But, if you insist... Navigate to Alfred preference panel, double click on Coinc, and change the Bundle Id from tech.tomy.coon to tech.tomy.coinc as the following image, then remove the folder ~/Library/Application Support/Alfred/Workflow Data/tech.tomy.coon again.

截圖 2020-11-04 下午5 44 04

stevenjlho commented 4 years ago

@tomy0000000 Thanks for your help. it work without problem

arvidbjorkstrom commented 3 years ago

I was getting this error as well. Tried removing an re-adding the workflow, but got the same error each time. Removing the ~/Library/Application Support/Alfred/Workflow Data/tech.tomy.coon file fixed it.

Adding the debug code from getting the error:

[12:18:43.977] Coinc[Script Filter] Queuing argument '100'
[12:18:44.375] Coinc[Script Filter] Script with argv '100' finished
[12:18:44.383] ERROR: Coinc[Script Filter] Code 1: .
12:18:44 workflow.py:2061 DEBUG    ---------- Coinc (1.3.0) ----------
12:18:44 workflow.py:1468 DEBUG    reading settings from /Users/arvidbjorkstrom/Library/Application Support/Alfred/Workflow Data/tech.tomy.coinc/settings.json
12:18:44 workflow.py:2343 DEBUG    update check not due
12:18:44 workflow.py:2080 ERROR    [Errno 66] Directory not empty
Traceback (most recent call last):
  File "/Users/arvidbjorkstrom/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.02A1D994-19AD-45BC-9082-33BEF459AE56/workflow/workflow.py", line 2073, in run
    func(self)
  File "main.py", line 12, in main
    if coinc.utils.manual_update_patch(workflow):
  File "/Users/arvidbjorkstrom/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.02A1D994-19AD-45BC-9082-33BEF459AE56/coinc/utils.py", line 62, in manual_update_patch
    os.rename(old_path, new_path)
OSError: [Errno 66] Directory not empty
12:18:44 workflow.py:2082 INFO     for assistance, see: https://git.io/JfjXg
12:18:44 workflow.py:2103 DEBUG    ---------- finished in 0.071s ----------
[12:18:44.385] Coinc[Script Filter] {
  "items": [
    {
      "valid": false,
      "subtitle": "[Errno 66] Directory not empty",
      "icon": {
        "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns"
      },
      "title": "Error in workflow 'Coinc'"
    }
  ]
}

Reinstalling the workflow (v1.3.0 from Packal) re-adds the directory and reintroduces the error.

tomy0000000 commented 3 years ago

@arvidbjorkstrom Please try the latest update release (v1.3.1) from GitHub, let me know if that's not working.