Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Outliner with drag/drop reordering
-
@ihf could you retest without Pythonista running and check if you have the hud_alert
I don't have any problem and the file is updated, and Pythonista was running but no script
-
@cvp that was interesting. Right after I got your latest post, I tried again without Pythonista running (was sure I did that before) and got the HUD alert! However, when I then went into Pythonista, I tried to open the file that I was appending, I see 3 files with that name (differing timestamps) and opening any of them now gives:
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3710, in tableview_cell_for_row v = MyInputAccessoryView(row) File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1075, in __init__ self.width = mv.get_screen_size()[0] # width of keyboard = screen File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1708, in get_screen_size for window in UIApplication.sharedApplication().windows(): File "/var/containers/Bundle/Application/8778D1CF-1C08-48BA-9714-9D2CFE524EA1/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/objc_util.py", line 801, in __call__ ordered_args = list(args) + [kwargs[key] for key in kwarg_order] TypeError: 'int' object is not iterable ```
-
@ihf as you can see, it is one more time a not understandable message of Pythonista crash in standard code. Was outline script running while your tests? Perhaps cross of files.
If you save the file just after the share, you could override the append. -
@cvp Now I went back to try again, and I can open any of the 3 files and each one has the appended text (1, 2 or 3 times). It is as if I had to wait (perhaps an iCloud issue) and then I have 3 copies, each with one or more of my Shared texts.
-
-
@ihf The appex mode opens the latest version if multiple exist, append the shared text and creates a new file as usual to avoid old problems and remove this one I had open.
But of course, if any crash during process or iCloud problems.....These iCloud problems are annoying... what to do?
-
@cvp I tried again to run the extension and again (without Pythonista running) it says cannot run because script is running. I did it after killing the app from which I was doing the Share and tried again. This time the HUD alert came out after about 5-7 second. When I went to open the file in Outline script, I got the "int" object is not iterable.
-
@cvp If I open the file in Xcode on my Mac, I can see that the latest append was done.
-
@ihf I can't do anything about the message of "already running", the shared script is not finished, perhaps due to writing in an iCloud file
-
@ihf If the problem can't be solved and you want to run full outline after the share, why don't you copy the text in your other app and paste it in Pythonista run?
-
@cvp I understand, I will just be patient. However, now I restarted Pythonista and the Outline script and any file I try to open is giving that error. After waiting a few minutes and doing it again, the error has gone away and I can open my outlines, including the one to which I used the share extension to append. Since the script isn't changing or presumably maintaining state, I can only assume that this is somehow related to using iCloud. I wouldn't use it but for the fact that I tend to use the iPad and iPhone with this script. Maybe just waiting is the answer for now.
-
@ihf said:
After selecting the file, might be nice to have it do the search within the file as if you had used the magnifying glass on the open file
Tomorrow
-
Version V00.92 - in appex mode, after saving the appended file, save its new name in outline.prm so when running outline, we will get the new file as last one - correction of bug "the box for the magnifying glass search is cutoff at the top by the menu bar (on iPad in Landscape mode)"
-
@cvp I did a Share of some text and got:
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 5935, in <module> main() File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 5867, in main fil.write(t) UnicodeEncodeError: 'ascii' codec can't encode characters in position 2044-2045: ordinal not in range(128) Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 1698, in init2 self.button_files_action('Open') File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 2559, in button_files_action self.files_action(sender, act) File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 2633, in files_action self.pick_open_callback(None) File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3050, in pick_open_callback prms = c_prms[1] IndexError: list index out of range
Also, should the share accept URLs or images?
-
@ihf Concerning list of files containing searched text, I need to have the list of outlines, and the only ways is a listdir but it only returns the locally downloaded files. Thus you can miss those who are not downloaded.
-
-
@cvp I presume there is no way for the script to download and undownloaded files when it starts?
-
@cvp the first time I did the share and got that error, I wa copying an equation and I figured that might be a problem. Then I tried again with text and got it again. I’ll try again..perhaps some state was preserved?
-
@ihf it could perhaps if their full names were all known
-
@ihf said:
equation and I figured that might be a problem.
Sure. Perhaps I could support it but needs to be studied