robwalton / alfred-ulysses-workflow

Alfred 3 workflow for Ulysses
http://www.alfredforum.com/topic/9662-ulysses-workflow/
79 stars 10 forks source link

Error when using u/us/ug commands #2

Closed rogeriomarques closed 6 years ago

rogeriomarques commented 7 years ago

I get the following error message when trying to run this workflow. Any idea of what I could try?

00:53:52 workflow.py:2207 ERROR    [Errno 2] No such file or directory: '/Users/rogerio/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Groups-ulgroup'
Traceback (most recent call last):
  File "/Users/rogerio/Dropbox/Private/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CFA40A37-6ED5-43BA-8847-E6DA782D50D3/workflow/workflow.py", line 2200, in run
    func(self)
  File "ulysses_items.py", line 55, in main
    groups_tree = parse_ulysses.create_tree(parse_ulysses.GROUPS_ROOT, None)
  File "/Users/rogerio/Dropbox/Private/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CFA40A37-6ED5-43BA-8847-E6DA782D50D3/parse_ulysses.py", line 58, in create_tree
    filelist = os.listdir(rootgroupdir)
OSError: [Errno 2] No such file or directory: '/Users/rogerio/Library/Mobile Documents/X5AZV975AG~com~soulmen~ulysses3/Documents/Library/Groups-ulgroup'

I'm running El Capitan, latest Alfred and Ulysses.

Thank you for both the workflow and attention.

robwalton commented 7 years ago

At first glance it looks like you are maybe not using iCloud to host your files? Are you using text based files instead (e.g. Dropbox)?

I've only set the workflow to work with iCloud folders.

rogeriomarques commented 7 years ago

You are right, I'm not using iCloud.

I'll try to modify the workflow... any particular considerations?

Thanks anyway!

robwalton commented 7 years ago

Cool. It would have actually be easier to make it work with dropbox than iCloud. The code builds up a tree of sheet and group nodes by reverse engineering the structure iCloud. There is a parse_ulysis.py file with Nodes that represent Sheets and Groups. Code is not that well documented, but I think is fairly clear. You might need to check to see which attributes the ulysses_items.py uses uses--my intent was to put everything relevant on the Node base class though (but may not have stuck to this). I'd create two new types for simple file based folders and txt files and then most of the rest of the code won't need to change.

If this is not your gravy, at least I've thought it through now, might look at it someday. Lots of good ideas queued up though!

robwalton commented 7 years ago

P.S. For now, I'll pop up a dialogue so other's understand that only iCloud is supported.

rogeriomarques commented 7 years ago

Thanks, I'll have a look and let you know.

robwalton commented 7 years ago

I've just added Ulysses local library as well the iCloud one and it went okay. Have tidied up code on master. Have you got anywhere yet? To search external folders it looks like we'd also have to add commands to manually add and remove them to workflow unless there is a Ulysses property file somewhere. Otherwise looks doable.

rogeriomarques commented 7 years ago

Not yet, I've started working on it yesterday but suddenly a bunch of my servers began misbehaving and I haven't got the time to work on the workflow, sorry. Hopefully tomorrow. I'll let you know.

zurdors commented 7 years ago

Hi, @robwalton.

un command no working for create new sheet. I have installed Alfred v3.3.2 and Ulysses v2.8.2 in macOS 10.12.5.

PoBlue commented 7 years ago

i have the same issue: un command no working for creating new sheet.

Below is the error message:

2017-06-23 4 29 35

PoBlue commented 7 years ago

I have solved this error, here is my solution code

robwalton commented 6 years ago

Thanks @PoBlue, I've merged your pull request. I must admit that I have never properly tried the workflow out with local files rather than iCloud files. Will make a release soon.