omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    10
    1003
    660267
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ccc
      ccc last edited by

      Pythonista will run on M1 Macs

      It does!

      1 Reply Last reply Reply Quote 0
      • ihf
        ihf last edited by ihf

        @cvp Not for my job, for personal use. Good to know Pythonista will run on M1 Macs. Now if only @omz would reappear or make Pythonista Open Source.

        cvp 1 Reply Last reply Reply Quote 0
        • cvp
          cvp @ihf last edited by cvp

          @ihf New V00.96 with

          Version V00.96
            - deactivation of the whole undo/redo process for testing if it could be 
              the origin of crashes 
              nb: it could not be a vital functionality as it did not work correctly
          

          tell me if you felt any improvement

          1 Reply Last reply Reply Quote 0
          • ihf
            ihf last edited by ihf

            @cvp I just downloaded v0.96 ran it and got:

            Traceback (most recent call last):
              File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 905, in <module>
                PY3 = sys.version_info[0] >= 3
            NameError: name 'sys' is not defined 
            

            Restarting Pythonista did not help.
            P.S. I knew that undo/redo was not working so I stopped testing it as I figured it was on your list.

            cvp 2 Replies Last reply Reply Quote 0
            • cvp
              cvp @ihf last edited by

              @ihf sorry For that, I replaced a lot of import xxx into from xxx import yyy, and I forgot this one

              New V00.97 with

              Version V00.97
                - correction of bug "PY3 = sys.version_info[0] >= 3 NameError: name 'sys'
                  is not defined"
              
              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @ihf last edited by cvp

                @ihf could you tell me if you have still crashes during a run of the script,

                If you process so:

                • remove Pythonista
                • wait 10 seconds
                • restart Pythonista
                • run the script

                Other question : do you have Pyto, it is open source. I dare not estimate the number of days needed to convert outline.py to Pyto because its ui and its editor are a lot less rich, assuming that all features are supported. But, at least, Pyto it-self is supported and you get updates frequently. I'm always surprised by what a person alone can realize. Even if Pyto is still far from Pythonista, it is obviously a marvelous app for an unique developer.

                1 Reply Last reply Reply Quote 0
                • ihf
                  ihf last edited by ihf

                  @cvp yes, I have Pyto.
                  I just started outline on my iphone ( I was using it on my iPad yesterday). It crashed Pythonista so I followed the steps you listed and it crashed again. I also tried starting it using pythonista3:// but after I start the script Pythonista crashes. What to do?

                  cvp 1 Reply Last reply Reply Quote 0
                  • cvp
                    cvp @ihf last edited by cvp

                    @ihf could you try to get the crash reasons? In fault_log folder or _obj_exception.txt file, both in root

                    Faultlog, see @dgelessus 's code

                    For me, crashes have always the same reason "segmentation fault" without any traceback. No way to identify the origin, sorry for you.

                    Pyto and future Swift Playground 4 would allow to develop an app on iPad...

                    1 Reply Last reply Reply Quote 0
                    • JonB
                      JonB last edited by

                      @cvp, how repeatable is the crash?

                      You could consider adding some logging calls to write trace info to a file. Or could use the trace module to for instance log all function calls, then eventually narrow to all lines within a single function.

                      Have you watched memory at all? For instance, the issue with processing lots of images without doing NSAutoreleasePool. If there is a leak somewhere, it will eventually crash without warning.
                      Or, maybe if you are opening lots of file handles without closing.

                      cvp 2 Replies Last reply Reply Quote 0
                      • ihf
                        ihf last edited by ihf

                        @cvp @JonB It was completely repeatable but I then decided to try to run a completely different script which ran fine and then I went back to running outline and it ran. If this happens again, I will try to get some better debugging information.

                        cvp 4 Replies Last reply Reply Quote 0
                        • cvp
                          cvp @JonB last edited by

                          @JonB said:

                          Have you watched memory at all? For instance, the issue with processing lots of images without doing NSAutoreleasePool. If there is a leak somewhere, it will eventually crash without warning.
                          Or, maybe if you are opening lots of file handles without closing.

                          No memory used, it occurs even with a data file of some bytes.
                          Script uses maximum files, all using "with open(...)"
                          It occurs even without images, and anyway, I use sometimes maximum 3 images

                          1 Reply Last reply Reply Quote 0
                          • cvp
                            cvp @ihf last edited by

                            @ihf said:

                            run a completely different script which ran fine and then I went back to running outline and it ran

                            Strange...very difficult to identify if depends on what we did before 😰

                            1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp @JonB last edited by cvp

                              @JonB said:

                              You could consider adding some logging calls to write trace info to a file

                              Following your advice, I've modified my script to write (without buffering) in a outline.trace file all called functions (mine).
                              I wanted to write inspect.stack()[1][3] but sometimes I got some index errors, thus I tried str(inspect.stack()) and seeing it contains .........function='name', I extract this name and logs it.

                              You will laugh but as soon I did (only) that, I don't have any crash more. Wait and see

                              1 Reply Last reply Reply Quote 0
                              • cvp
                                cvp @ihf last edited by

                                @ihf New v00.98 with

                                Version V00.98
                                  - trace each called function in outline.trace, without buffering
                                

                                Thus, if you geT a crash, try to describe your scenario and post the outline.trace file, if possible in GitHub, as this file could be very big, else if you crash at begin.

                                1 Reply Last reply Reply Quote 0
                                • cvp
                                  cvp @ihf last edited by

                                  @ihf It is a long time since we last had a dialogue here.
                                  Some questions I would like you to answer very sincerely:

                                  1. Are you still using my program?
                                  2. If so, would you be (sincerely, I insist) interested in running it under Pyto? Becuse you would prefer an open source app (even if I don't see who would continue to modify it)
                                  3. The conversion to Pyto seems to me an enormous work which would certainly meet impassable walls, therefore which will take months, but which I would accept to carry out for the challenge.
                                  1 Reply Last reply Reply Quote 0
                                  • cvp
                                    cvp @ihf last edited by cvp

                                    @ihf As an example, I spent a lot of hours to make my very little module SetTextFieldPas running in Pyto because a lot of functionalities do not exist or differently, mainly ObjectiveC used in this module. If you see the image below, don't believe some code is associated to all these buttons. Nothing is programmed except the buttons themselves.
                                    It was only to find a coherent SF Symbol because obviously Pythonista internal icons are not available.

                                    1 Reply Last reply Reply Quote 0
                                    • ihf
                                      ihf last edited by

                                      @cvp In answer to your first question, I use the app every day! The problems I was having with Pythonista crashing frequently, especially at start up of Outline, have abated. I found that if Pythonista crashed when I started outline, then if I restarted Pythonista and first ran another script, then outline would start without a problem. I don’t understand why this works but it does.
                                      Your second question is harder to answer. On the one hand having outline run in an environment that is supported (even if that means by an open source community) is an advantage. I only use Pyto occasionally and I have no idea how responsive the open source Community is to maintaining it but at least it is possible. I wish that @omz would either reappear or make his code open source but I am not counting on either happening. It would be a shame if Pythonista stopped working under a future release of iOS but that is a possibility. You have put in a tremendous amount of work to create what I view as an extraordinarily useful app. If you are up for the challenge of moving it to Pyto, I am certainly happy to help test it. In the meantime, rest assured that I’ll continue to use the app and I remain in awe of both your willingness to do this and your skill.

                                      1 Reply Last reply Reply Quote 0
                                      • ihf
                                        ihf last edited by

                                        @cvp I would add that if you were up for an even bigger challenge, converting to Swift, would probably be the best course for the app. Of course, that still begs the question of support for the app (not the platform).

                                        cvp 1 Reply Last reply Reply Quote 0
                                        • cvp
                                          cvp @ihf last edited by cvp

                                          @ihf I agree with all you said (except when you are too kind about me). I could convert to Pyto (obviously with some limitations, and in a period of 2 months) and I wish I could convert in Swift but I think I'm too old to learn this language from scratch 😢

                                          I'm so sad that Pythonista crashes so. Did you test with the V00.98 and did the crash provide a .trace file allowing to hope to identify the crash reason.

                                          1 Reply Last reply Reply Quote 0
                                          • ihf
                                            ihf last edited by

                                            @cvp I may have spoken a bit too soon. As you know I use outline on several devices. I just try to use it on my iPhone and when I started the outline (not when I started pythonista), pythonista crashed. I realized that I am running version 0.97 on this iPhone so I just downloaded version 0.99. There is an error regarding the directories outline.
                                            versions.

                                            cvp 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors