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.


    General bug report thread

    Pythonista
    15
    49
    36161
    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.
    • dgelessus
      dgelessus last edited by

      Changing the name of any folder will always move it into the root Script Library folder, even if it was previously located elsewhere. Fortunately this does not cause data loss, all files will still be in the folder after this happens, so you can move the folder back to the correct location no problem. If you can move folders, that is.

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

        Thanks! I'm surprised no one (including me) has noticed this before, that bug must have been there for a while...

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

          I noticed it a while back, but actually thought it was a feature :). The name you type gets interpreted as a path name relative to the Documents folder, so you can move a folder using the rename button, by typing in a relative/path/name. If you want to rename in place, you can do it, if you include the path name relative to Documents.

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

            @omz, I have noticed it a while ago too, but I thought you already know about it and it will be fixed in the new version :)

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

              Here is another bug.

              Looking at a script, if you press and hold the Run button, a dialog box appears that allows you to specify command line parameters. Looking at the console, if you press and hold the Run button, no dialog box appears.

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

                More bugs! When calling a console.input_alert(), password_alert() or login_alert(), the keyboard focus isn't actually in the text field, but remains in the console/editor.

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

                  Here's one... ui.measure_string seems to give an error when trying to pass a line break mode

                  >>> ui.measure_string('test',line_break_mode=ui.LB_WORD_WRAP )
                  Traceback (most recent call last):
                    File "<string>", line 1, in <module>
                  RuntimeError: more argument specifiers than keyword list entries (remaining format:'i')
                  
                  1 Reply Last reply Reply Quote 0
                  • ccc
                    ccc last edited by

                    ui.measure_string needs to be called in the main thread within a drawing context. Does this bug occur when ui.measure_string() is called in the main thread within a drawing context?

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

                      @ccc It looks like those are two separate bugs.

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

                        The console input alert variants only take title, message and hide_cancel_button as keyword arguments. The other arguments need to be passed positionally. For example, this is not possible:

                        console.input_alert("Enter something", ok_button_title="Uzbekistan")
                        

                        Instead, this has to be done:

                        console.input_alert("Enter something", "", "", "Uzbekistan")
                        

                        However, this is possible:

                        console.input_alert("Enter something", hide_cancel_button=True)
                        

                        Oh, and hiding the cancel button causes the input dialog to always raise a KeyboardInterrupt("canceled"), even though it should return the input string.

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

                          Pythonista crashes when I try to save a PIL Image. No python errors, but a real crash. I think this happens at a memory leak, I've had pythonista crash before when using too big PIL Images.

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

                            @coolius A few more details would be helpful – what type of image file are you trying to save (png, jpeg...), where did the image come from, how big is it, what kind/generation of device are you using...?

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

                              ui.covert_point, et al, does not work right in fullScreen, converting to/from Screen coordinates.

                              Here's an example.

                              
                              import ui        
                              
                              class testconvert(ui.View):
                                  def __init__(self):
                                      self.t1=ui.Label(frame=(0,60,400,20))
                                      self.t2=ui.Label(frame=(0,90,400,20))
                                      self.t3=ui.TextView( frame=(0,120,100,20),bg_color=(1,0,0))
                                      self.t3.begin_editing()
                                      self.t3.text='textview for kb'
                                      self.t1.text='touch to begin'
                                      [self.add_subview(s) for s in [self.t1,self.t2,self.t3]]
                                  def touch_began(self,touch):
                                      self.t1.text='touch in view:={0:1}'.format(touch.location)
                                      self.t2.text='touch in screen:={0:1}'.format(ui.convert_point(touch.location,self,None))
                                  def draw(self):
                                      kb=ui.get_keyboard_frame()
                                      ui.set_color((0,1,0,0.5))
                                      ui.fill_rect(kb[0]-10,kb[1]-10, kb[2]+20,kb[3]+20)
                                      
                                  def keyboard_frame_did_change(self,frame):
                                      ui.delay(self.set_needs_display,0.5)
                                  def touch_moved(self,touch):
                                      self.touch_began(touch)
                              
                              V=testconvert()
                              V.present('fullscreen',hide_title_bar=True)
                              
                              

                              In fullscreen, we'd expect both screen and view coordinates to match. But it seems like convert is using landscape, button left, as the coordinate system, both for origin and orientation.

                              This may be related to some of the keyboard funniness, seems like maybe keyboard frame related functions might be using a similar convention, except I think keyboard frame is fixed in portrait! The keyboard frame in this example is drawn in green, slighty bigger than real frame so you can see it... Setting the keyboard to split and moving it up/down shows how the kb thinks it is moving... Things seems to be fixed to portrait, except it seems to switch between right side up and upside down depending on how it is rotated in landscape...

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

                                A bug in the scene module?

                                If you set frame_interval to 0.1 in scene.run, it will give you an error.<br>
                                If after that you change frame_interval to 0 and try to run script again, nothing happens.<br>
                                If you try to run the script again, Pythonista crashes (often)<br>

                                Smallest example:

                                import scene
                                
                                scene.run(scene.Scene(), frame_interval=0.1)
                                
                                1 Reply Last reply Reply Quote 0
                                • techteej
                                  techteej last edited by

                                  When using the UI Editor...

                                  1.) Place a segmented control in the center of your view.

                                  2.) Place a label underneath segmented control, also in the center of your view.

                                  3.) Present as a sheet, and you'll see the label gets auto positioned under right segment.

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

                                    Tech, not a bug. label defauls to no flex, segmented control defaults to LR. Just go into attributes/resizing, snd select the left and right parts to force LR flex.

                                    Actually, this does bring up something confusing: in the ui editor, where you select flex settings, the convention seems to be reversed for WH compared to TBL or R. In other words, when you have W or H selected, those arrows show up as dark/solid. When you have T, B, L, or R selected, they show up as light/dashed.

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

                                      @JonB True, that can be a bit confusing. I'm following Interface Builder's conventions in the UI, see this StackOverflow answer for a couple of examples (screenshots with explanations).

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

                                        @omz wow, bizarre! The IB convention makes no sense!

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

                                          Can't remember if this was reported... In ui builder, if the resizing options dialog is open (the flex animation thingie), then you click in the button which toggles between editor and ui builder, pythonista crashes

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

                                            I often find Pythonista crashes when I copy text from a web page directly into the editor. Is this a well known bug or should I provide examples?

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