Forum Archive

Bug list for beta release 160037

JonB

I figured I would start a thread to document bugs in one place.

As of ~~160036~~ 160037 (starting to test in 2.0):

bugs

  • ~~extended keyboard still does not work in console on iPad 3/ios8.~~
  • ~~On Ipad 3, typing a two single quotes after an equal sign in the editor results in =''' instead of =''. pressing a space before the = properly inserts a pair of quotes.~~
  • On Ipad 3, fullscreen convert_point, convert_rect, do not work correctly in fullscreen. see here. This was a bug in 1.5 as well, though I thought it was fixed in a recent beta build
  • Similar problems with convert_point converting from a sheet to None.. the result has the sheet screen position added in twice. Thus 0,0 gets converted to (2x,2y) instead of (x,y)
  • View.close does not work for panel mode (not new)
  • Keyboard focus stays in editor, but shows console
  • ~~Keyboard displays white keys after dismissing view.~~
  • View.touch_enabled = False has no effect:
>>> v=ui.View()
>>> v.touch_enabled
True
>>> v.touch_enabled=False
>>> v.touch_enabled
True
  • popover_location does not accept ui.Point [verified in 2.0]
  • ~~SegmentedControl().subviews does not work properly~~
  • image_quad from arguments are incorrectly scaled. (workaround seems to be to multiply by 2, though i suspect this may depend on device)[not tested yet in 160037]
  • ui editor does not save the currently editing view when switching focus to console (unlike script editor, which does). This leads to confusion when loading/presenting a view from the console( why the $!?& is the button action i added not getting called?). It does seem to save when switching to a different file tab. Seems like whenever console input gets focus, play is pushed, or an action run, any dirty files should be written to disk first.
  • editor strips off trailing newlines from files.
  • syntax highlighting for multiple same line imports (import ui, os) only highlights first module
  • SpriteNode without a texture=None does not work.
  • IndentationErrors in the traceback viewer do not navigate to, or highlight the offending line, despite listing the line number in the traceback.
  • TableView does not honor flex or frame in constructor.
  • ~~App Extension does not work on 32 bit devices. ~~
  • autocomplete in console: autocomplete after an equal sign (without a space) results in whole line getting replaced.
  • If a quote is opened in the console input, copy/paste from the console does not work (copy is from the input, not output)
  • scene.ShapeNode requires a path argument, otherwise attribute error occurs.
  • Vector2, etc type error when using future.division.
  • Rect.inset does not work correctly when the Rect has negative widths (need to change sign of inputs)
    *
    ## suggestions
  • (suggestion) Views presented as panel should have the "dock" button to return to the editor (rather than first tabbing to console). This goes for webbrowsers too.
  • (suggestion) option to open contextmenu help in docked doc window rather than popover quickhelp. or, a button in quickhelp to open same page in full docs.
  • (suggestion) ability to manage editor tabs.
  • (suggestion) Community forum link should open in an internal webbrowser, rather than launching safari. Or, this should be an option. With the new docking mode, it is now much easier to paste back and forth between editor and forums.

updated 11/13

omz

extended keyboard still does not work in console on iPad 3. Can anyone confirm on 64 bit?

Is this on iOS 8 or 9?

JonB

sorry, ios 8

omz

I see, thanks. The extended keyboard uses a completely different implementation on iOS 8, and I somehow forgot to fix that as well.

ccc

First off, a massive congratulations to you @omz for the scene rewrite and especially the new docs for that module. The intro will rapidly get any wannabe game developer hooked!! It will break a few things but your moving sk functionality into scene is brilliant and performance seems impressive.

Bugs

  • Almost all third party modules are not current with PyPI.
  • Many third party modules are present but not listed in the documentation: Crypto ctypes dateutil ecdsa flask html2text html5lib httplib2 itsdangerous jedi jinja2 mechanize midiutil mpmath oauth2 parsedatetime pycparser pyflakes pygments pyparsing PyPDF2 pytz reportlab simpy six sqlalchemy sympy thrift werkzeug ~~wsgiref~~ xhtml2pdf yaml
techteej

@ccc I see a Cloud Jump 2 revive coming soon ;)

JonB

The application extension does not seem to be working on ios 8/ 32 bit. Clicking "run pythonista script" from the share sheet results in... nothing.

Possibly my .extension folder is screwed up, one of the previous betas moved Documenta into .Extension (so the folder is pretty large), though i think this still worked with the last beta.

userista

(Suggestion) on the iPhone it's hard to tell when a line wraps - perhaps a line wrap glyph and/or line numbers would be a nice improvement.

Phuket2

Looks like the < > navigation buttons have disappeared in the help browser in this release

omz

@Phuket2 They're at the bottom now. This works better in "docked" mode.

Phuket2

@omz , opps, sorry. So they are :) maybe you need to say people over 50 can not be beta testers :) the eye sight is so bad. The Whiskys also don't help :)

Webmaster4o

This is a bug.

If my keyboard is open when I present a view, it looks like this when I two-finger swipe to dismiss the view

Sebastian

Every time I try to create a new script or file, I get an error saying "The new file/project couldn't be created. Please make sure that you entered a valid file name." Am I the only one who gets this error? I'm using an iPhone 5S with iOS 8.1.

Edit:
Everything works fine now, I reinstalled Pythonista and now the error message is gone.

Wizardofozzie

@ccc said:

First off, a massive congratulations to you @omz for the scene rewrite and especially the new docs for that module. The intro will rapidly get any wannabe game developer hooked!! It will break a few things but your moving sk functionality into scene is brilliant and performance seems impressive.

Bugs

  • Almost all third party modules are not current with PyPI.
  • Many third party modules are present but not listed in the documentation: Crypto ctypes dateutil ecdsa flask html2text html5lib httplib2 itsdangerous jedi jinja2 mechanize midiutil mpmath oauth2 parsedatetime pycparser pyflakes pygments pyparsing PyPDF2 pytz reportlab simpy six sqlalchemy sympy thrift werkzeug ~~wsgiref~~ xhtml2pdf yaml

Out of interest, how do you find these modules?
For example:

import oauth2, os
odir = os.path.dirname(oauth2.__file__)
# odir = /var/mobile/Containers/Bundle/Application/C370CA19-1410-4DA3-975F-CBA563809E66/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/oauth2
# so oauth2 dir is in site-packages/oauth2

If I use Stash to look for the ~/site-packages/oauth2 directory, it's not there. What gives?

Edit: In Stash:
cd ~/Documents/site-packages
ls -a1
cd oauth2 <- ERROR

(Excuse what may be a very basic question!)

Wizardofozzie

Quick bug:

  • closing Pythonista or locking the iPad while watching a video (mp4) using Quick View does not stop the video (and audio) from playing
  • Importing ripemd160 module raises a NoneType not Callable when Pythonista modules (eg photos, dialogs, clipboard) have already been loaded, however ere is no such issue if the module is run first (Link to come)
JonB

the built in modules come preloaded in the app library, not in docs. You can view these folders from the Standard Library in the file browser, or grab the name as you already did, then navigate there in stash. There is no direct way to get there from Documents, because of the way apple sandboxing works. Actually, we probsbly should open a pull request in stash to provide an environment variable to the library folder.

as for ripemd160.... are you doing an from xxx import *? If so, you can often expect issues with namespace clashes. Also, if you aborted an import, that usually results in failure to import later, unless you restart pythonista. In the rare event that this is real, do
import pdb; pdb.pm() to figure out what is trying to be called.

Wizardofozzie

@JonB said:

the built in modules come preloaded in the app library, not in docs. You can view these folders from the Standard Library in the file browser, or grab the name as you already did, then navigate there in stash. There is no direct way to get there from Documents, because of the way apple sandboxing works. Actually, we probsbly should open a pull request in stash to provide an environment variable to the library folder.

as for ripemd160.... are you doing an from xxx import *?

Yep :)

If so, you can often expect issues with namespace clashes. Also, if you aborted an import,

Can you clarify this? Would

try:
    from urllib import add_opener # python3
except ImportError:
    from urllib2 import add_opener # python2

trigger the error?

that usually results in failure to import later, unless you restart pythonista. In the rare event that this is real, do
import pdb; pdb.pm() to figure out what is trying to be called.

@JonB said:

the built in modules come preloaded in the app library, not in docs. You can view these folders from the Standard Library in the file browser, or grab the name as you already did, then navigate there in stash.

Forgive me if this is a basic question, but how do I go about this? Ie how do I use stash to navigate to the Std Library directory?

as for ripemd160.... are you doing an from xxx import *? If so, you can often expect issues with namespace clashes. Also, if you aborted an import, that usually results in failure to import later, unless you restart pythonista. In the rare event that this is real, do
import pdb; pdb.pm() to figure out what is trying to be called.

ccc

grab the name [ ... ] and navigate there in stash.

Means type the following into stash:

cd /var/mobile/Containers/Bundle/Application/C370CA19-1410-4DA3-975F-CBA563809E66/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/
ls
JonB

@simcity4242

Also, if you aborted an import,
I mean if you press the X button to abort a script in the middle of a long import, the subsequent import will generally fail in confusing ways.

techteej

When clicking empty trash, the trash empties but Pythonista also crashes.

iOS 9.0.2 - iPad 3

JonB

I could not reproduce this on ipad 3/ ios8

georg.viehoever

@techteej I Did see no problems on my ipad2 ios9.1
Georg

Phuket2

@georg.viehoever , where?if you look on the thread, you don't have an entry. So somehow, when you submitted it didn't work!

ccc

@georg-viehoever was referring to @techteej 's bug report on emptying the trash.

JonB

bug: View.touch_enabled cannot be changed.

JonB

inconsistency: View.present popover_location does not accept a ui.Point.

JonB

convert_point and convert_rect do not work properly with a None argument if the view is a sheet. not as bad as fullscreen, but there is an extra offset equal to the top left corner, as if that were being accounted for twice.

zencuke

The files window ion an iPhone 6+ is not as wide as the screen. A stripe of the file screen shows on the right. I hope this is a bug. I'd rather have the full width of the screen to show longer file names.
iPhone screenshot

Webmaster4o

@zencuke this is not a bug. It's more obvious on iPad, but it's a conscious UI choice.

zencuke

Missing documentation. The current process for adding an icon to execute an extensions script directly doesn't seem to be documented. I think the current documentation refers to an earlier process. I looked in "Pythonista Modules/appex - Using the Pythonista Sharing Extension" doc and .extensions/_Readme.md and didn't see it in either place.

zencuke

@Webmaster4o: Intentional or not I'm having difficulty understanding the value of this. The tiny view of the file on the right adds no useful functionality to the UI. It just takes away functionality from the file list window. The iPhone screen is small as it is. Squeezing it even more is a pain, especially for no benefit. It may mean something on the iPad but it looks like a bug on the iPhone. It is bad enough on the iPhone 6 plus. It must be even worse on smaller iPhones like the regular iPhone 6. The edit window gets a whole screen. The console and doc screens get to be full width but for some reason the file list has to be narrower? With no useful functionality in exchange? Makes no sense.

JonB

Not sure if this is a bug or just not well documented. in the latest beta, wait_modal seems to stop any ui.in_background from getting executed until after the view is closed.

Wizardofozzie

@ccc said:

grab the name [ ... ] and navigate there in stash.

Means type the following into stash:

cd /var/mobile/Containers/Bundle/Application/C370CA19-1410-4DA3-975F-CBA563809E66/Pythonista.app/Frameworks/PythonistaKit.framework/pylib/site-packages/ ls
πŸ˜‹
I had no idea about this! Thx!

Olaf

I love the the possibilities offered by obcj_util. While exploring these, I ran into an error.

I managed to end up with an ObjCInstanceMethod without method attribute, which (not surprisingly) makes Pythonista exit when called

>>> f = ObjCClass('UIDevice').currentDevice().batteryMonitoringEnabled
>>> f.encoding
'B0@0:0'
>>> f.method
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'ObjCInstanceMethod' object has no attribute 'method'
>>> f()
Bye bye

I believe this is causes by the final if statement in ObjCInstanceMethod._ _ init _ _ in objc_util, which neither assigns self.method nor raises an exception in case self.encoding is True-ish.
I guess this should be something like

if method:
    self.method = method
    if not self.encoding:
        self.encoding = method_getTypeEncoding(method)
else:
    raise AttributeError('No method found for selector "%s"' % (self.sel_name))

Alternatively, ObjCInstanceMethod._ _ call _ _ could check.

My details: iOS 9.1, iPad Air 2, Pythonista Beta 160036

omz

@Olaf Thanks, looking into it now. The problem seems to be that batteryMonitoringEnabled is a property, and uses a custom selector name (isBatteryMonitoringEnabled).

Olaf

Yes, @omz, you're right on

...batteryMonitoringEnabled is a property, and uses a custom selector name (isBatteryMonitoringEnabled).

I found this isn't unique to battery. The same happens for property AVCaptureDevice.connected that needs translation into method isConnected. I noticed it happens to boolean properties, as e.g. AVCaptureDevice.localizedName works fine.
Hope this helps

ccc
import ui
ui.SegmentedControl().subviews

/Users/ole/Development/xcode/Pythonista/python/Objects/tupleobject.c:54: bad argument to internal function

JonB
  • image_quad from arguments are incorrectly scaled. (workaround seems to be to multiply by 2, though i suspect this may depend on device)
  • ui editor does not save the view when switching focus to console. This leads to confusion when loading/presenting a view from the console( why the $!?& is the button action i added not getting called?). It does seem to save when switching to a different file tab. Seems like whenever console input gets focus, play is pushed, or an action run, any dirty files should be written to disk first.
Webmaster4o

I've mentioned this before in a different thread, but the "replace" text input dialog in the find/replace has a few problems. First, it has no default text as find does.

Second, if you compare the keyboard to the keyboard in the "find" dialog, there are 2 differences. In replace, autocapitalize is on, and dark keyboard themes are not respected. The opposite is true in the find box.

Moe

Bug in the scene module:

The documentation for SpriteNode states, that a node without texture is rendered as a rectangle with the color of the color attribute. However creating a SpriteNode like this creates an error:

node = SpriteNode(texture=None,position=(10,10),color='blue')


TypeError: Expected Texture or image name.
JonB

@Moe a workaround: omit the texture argument if you don't want a texture.

blmacbeth

BUG: ui.TableView does not respect either frame orflex attributes. Meaning, it never resizes if you do it programmatically. I haven't tried it another way. A work-around for those wondering:

table = ui.TableView()
table_pntr = ObjCInstance(table)
table_pntr.frame = CGRect(CGPoint(0,0), CGSize(500,500))

Also, can we get a PhysicsNode in the scene module?

JonB

blmacbeth, the issue seems to be that these are not accepted in the constructor. However, setting .frame and .flex attributes after you create the TableView works fine.

import ui
v=ui.View(frame=([0,0,200,200]))
t1=ui.TableView()
t1.frame=(0,0,200,200)
t1.flex='w'
t2=ui.TableView()
t2.frame=(0,250,300,300)
v.add_subview(t1)
v.add_subview(t2)
v.present('panel')
JonB

I have noticed that sys.lath no longer contains . or Documents.
I thought in 160032 this was changed to
* Changed the order of sys.path once more, so that files in the main documents folder can't shadow standard library modules anymore. Imports from the current directory should also work again.
which I think had documents and '.' just at the end...

omz

@JonB The directory of the current script is still in sys.path, just as an absolute path instead of .. I don't remember the details right now, but there were some subtle problems with having . in sys.path.

I think Documents used to be in the import path, but I don't really think it should be there. That's what site-packages is for.

Webmaster4o

There's still that bug in syntax highlighting where if you have multiple same-line imports (import ui, os) only the first module will be correctly highlighted.

JonB

@omz
Oh, I see, the starting path of a script is added to sys.path as an absolute path, but not in the interactive console, and not when using chdir. That leads to a confusing situation where imports work when running a script, but not when pasting the same line by line.

There is something else strange happening with from . import xxx package imports, but not sure if it is related. Gittle imports did not work from . import path (complained about path, perhaps there is a conflicting path.py?). Strangley this woed wh gittle was in site-packages, but not whn it was in stash/lib ( and that path was on sys.path). I will need to experimt with this a bit.

ccc

The current beta expires in 21 hours.

Phuket2

13 hours now... Getting down to the wire
While it would be interesting to see what happens when the beta expires. I really prefer not to find out 😰

Webmaster4o

I've found the best way to contact @omz directly is through Twitter. The new beta is "processing" https://twitter.com/1defenestrator/status/670962735560134656

Phuket2

@Webmaster4o , thanks, I am not stressing about it. Just a bit of fun. If it goes off online for a day, will give me time to reflect πŸ€•πŸ˜ƒ

omz

I've uploaded a new build a couple of hours ago. It's still "processing" unfortunately (always a bit unpredictable how long that takes). If the current build expires before the new one is ready, you'll get a "beta expired" alert when trying to launch it, but it won't disappear from your device or anything like that. You might still want to make a backup of your files.

Tizzy

Just wanted to report - 15 hours since your post and the beta is expired but the new one hasn't shown up yet.

mmontague

It's there now.
Woke up to find the 037 beta waiting in TestFlight!

JonB

updated this thread for latest build.

Can anyone on ios8 using a 32 bit device check if the extension works? i.e safari share sheet, does clicking Run Pythonista Scropt do anything? this is the second build for me where it does not.

Tizzy

@omz just curious do you archive/export the bundle and then upload or do you upload through the archive manager in Xcode?

JonB

With the built in traceback viewer, IndentationError (expected an indented block) does not highlight the line number in the editor. This is strange, as IndentationError is a subclass of SyntaxError, which does highlight the offending line.

omz

@JonB said:

Can anyone on ios8 using a 32 bit device check if the extension works? i.e safari share sheet, does clicking Run Pythonista Scropt do anything? this is the second build for me where it does not.

Thanks, I just tested it on an iPad mini with iOS 8, and it doesn't work here either. I'm looking into it, not sure yet what to make of the crash log.

omz

@JonB Turns out I had accidentally left some testing code there that was using ReplayKit (iOS 9 only).

JonB

Not sure if this one is new or now, but the editor seems to be stripping of trailing newlines from files. I have not completely confirmed this yet, or whether it is a dulwich thing, or an editor thing, but my git is showing any file i open gets the final newline removed.

dgelessus

No, this is a feature of the editor, and it's been in for a while. (IIRC I included it on one of my long bug/suggestion lists at some point.)

JonB

autocomplete bug in console: any autocomplete in console that occurs after an equal sign results in the whole line getting replaced with the autocompleted item. Pressing a space after equals makes things work as espected.

JonB

bug: selecting /copying text from console output in split console mode does not work. Instead, select targets the console input. This is similar to a bug for the main console tthat was fixed in 160036 or earlier.

edit: actually this happens in either mode, but only when a quote is opened in the console input. i.e, typing

ObjCClass('

then trying to copy a class name from a previous console output does not work

Olaf

Though path is an optional argument to scene.ShapeNode(…), omitting it causes an attribute error because None has no line_width. Probably should be optionally assigned in line 287 of module scene:

if path is not None:
    self.line_width = path.line_width

The workaround is to use an empty path in scene.ShapeNode(path=ui.Path()).

ccc

Or start scene.ShapeNode.__init__() with path = path or ui.Path()

Olaf

While

import scene
v=scene.Vector2(3,4)
print(v/2)

works as advertised, adding

from __future__ import division

yields a type error (unsupported operand types). See operator.__truediv__ why this is so.
The workaround is to multiply (print(v*(1/2))), but obviously scene.Vector2.__truediv__ = scene.Vector2.__div__ would be much preferred.

Olaf

@ccc, your code works well, but what I didn't explain before is that I want to create a ShapeNode without an initial path, and set the path later. Creating a dummy path at initiation works, but seems wasteful. Also took me some time to figure out, why my code wouldn't work

Phuket2

Documentation Error
@omz, the Rect.inset api text appears to be wrong. The Rect param to pass in is not listed, omitted.
Is
Rect.inset(top, left[, bottom, right])
Think it should be
Rect.inset(other_rect , top, left[, bottom, right])

omz

@Phuket2 The inset method doesn't have an other_rect parameter (and I'm not sure what you'd expect it to do, maybe there's a misunderstanding about what the method does?).

dgelessus

Maybe inset is a normal method that you should call on a Rect instance (like a_rect.inset(...)), and you're trying to call it as a static method (like Rect.inset(a_rect, ...)).

Phuket2

@omz , yes I see now. Title should have said brain error. Too much alcohol of Christmas and new year. Oh, well sorry.
@dgelessus , you are right. I was not calling on an instance as I should have been 🀐 I am going to go and crawl under a rock now. With a whisky of course 😱

Webmaster4o

One documentation bug is that under documentation for the string module as well as for the built-in-type str, after all methods being listed, they are all listed again under deprecated methods, with only the actually deprecated methods having badges as such.

JonB

@JonB
in 2.0: (starting to update the running list as these are tested in 2.0)
* Deleting editor actions (from wrench) crashes pythonista in ios8.4.1 on ipad3.
* Copying from console does not work reliably if keyboard is shown (copy option is not shown, only paste. Can always be reproduced if opening s single wuote in console input, then trying to copy console output, but occurs in other situations as well)

Webmaster4o
  • In console prompt, if tapping an autocorrect prompt, it replaces your entire text
  • On the extended keyboard on iPad, long pressing on a key in the top row will show a pop up, but this popup is invisible for the bottom row.
JonB

The link to the forums in 2.0 seems to be broken. it points to
http://omz-software.com/pythonista/forums
which returns an object not found error.

Webmaster4o

@JonB The link you just posted redirects to https://forum.omz-software.com/category/5/pythonista for me.

omz

@Webmaster4o I fixed the redirect after @JonB mentioned it. Thanks!

JonB

editor actions: the additional script arguments does not seem to work anymore. Nothing is sent, and editing the action again shows a blank for that field.

ywangd

The builtin paramiko (version 1.13) has a bug which makes it incompatible with OpenSSH 6.7+. The error message is paramiko incompatible ssh peer. This happened when I tried to connect to my laptop running OSX 10.11.

Apparently paramiko 1.15 and up fixed this bug. I tested it by manually install v1.16 and it worked.

Also @JonB , maybe change the title to 2.0 instead of beta 160037?

JonB

The UI editor improperly fills out image path, nor does it display button images
The UI editor does not display the pop up "context menu" (delete/copy/subviews) unless an item is moved. (ipad3 ios8.4)

Hilletty

Geniux at internal execute.After you query everyone, i would absolutely claim in which having cut-throat exams for you to type in a world college B-School has been turning out to be challenging as well as We needed for you to expend per year connected with my own.
http://trycogniyouth.com/geniux/

Webmaster4o

@omz @Hilletty someone needs banning…

dgelessus

@Webmaster4o Under the three dots menu on each post there is an option "Flag this post for moderation", that's how I report spam posts at least. @omz Are you notified by the "flag" option, or is it better to mention you as well?

Webmaster4o

@dgelessus flagged for moderation first. I also wasn't sure, however.

omz

I'm get notifications about posts being flagged, thanks! It's better than responding to a thread because it doesn't push it to the top.

Webmaster4o

@omz Great, thanks. I'm the future I'll report without replying.