Skip to content

Instantly share code, notes, and snippets.

@bazbt3
Last active February 1, 2018 21:59
Show Gist options
  • Save bazbt3/dc0a28ae00b3af5661ee99db478f6c49 to your computer and use it in GitHub Desktop.
Save bazbt3/dc0a28ae00b3af5661ee99db478f6c49 to your computer and use it in GitHub Desktop.
Pythonista's `six` module bug: @thrrgilag's fix/workaround after my pain!
('pnut developers' chatroom; PigPen app output)
@bazbt3: [u:175+f+F]
2018-02-01 16:06:48+00:00
Did any of you have issues with Python not working correctly yesterday? PIL failed to import, but works today. pillow failed but works today. The PNUTpy library fails to import but only for pythonista.
---------------------------------
@33MHz: [u:1+f+F]
2018-02-01 16:08:17+00:00
@bazbt3 PNUTpy is working elsewhere? (it was just recently updated)
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:12:42+00:00
It's working fine for me thus far, the pypi package.
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:13:28+00:00
I haven't had a chance to setup Pythonista yet on my iPad. Hopefully this evening.
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:15:14+00:00
@33MHz It works at pythonanywhere.com and my host, but not pythonista now. I need to check what version I have installed, I need to check how to do that first! :) I did try uninstalling 0.2.2 and installing 0.2.1 but pythonista is still borked.
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:17:15+00:00
@bazbt3 does pythonista give you a python shell?
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:17:37+00:00
Incidentally, my crypto cryptocurrency app failed too, but the api I getbthevdata from was scheduled for maintenance *last* week.
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:25:24+00:00
@thrrgilag pythonista has a python console but no native bash shell. However installing StaSh brings bash functionality. gist: https://gist.github.com/CodyKochmann/4d6b40e77ba862e634185a038d2c3f13
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:27:13+00:00
Yeah python console is what I meant. Does the new version of PNUTpy load from the console if you do an import?
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:27:34+00:00
Assuming you have it installed that is
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:32:54+00:00
I have PNUTpy installed but it won't import. Uh-oh, just hadva fiddle: PNUTpy imports for python 2.7 but not 3.6; I get that connectregistry error woth 3.6. :(
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:33:49+00:00
Yeah that's the part that is weird to me. There shouldn't be any dependiency on connectregistry
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:34:10+00:00
I have to wonder if pythonista is doing something wonky with python 3.6
---------------------------------
@ericd: [u:20+f+F]
2018-02-01 16:38:38+00:00
@rafaelcosta Apero counts the number of posts it downloads in the first request when the app is launched, and if there's less than 50 it downloads more older ones with another request.
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:38:42+00:00
@33MHz My puthonista woes began right after updating to PNUTpy 0.2.1, no previous issues. Removing it then installing the 0.2.1 version still failed. I removed then reinstalled pythonista and it still fails. Which is why I asked the question about yesterday; everything pythonic failed for me yesterday! Doooooooooom! :D
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 16:41:42+00:00
@thrrgilag If it is it's the 0.2.2 update that started it uesterday. I wiah i knew more about Linux and python. And typing coherently!
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 16:44:41+00:00
Once I aquire pythonista I'll be able to sanity check things to see if there is special tweaking needed.
---------------------------------
@33MHz: [u:1+f+F]
2018-02-01 17:05:24+00:00
hum. wonder if something funky happened with the wheels.
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 18:18:11+00:00
@33MHz does thr PNUTpy number need updating from 0.3.9 to 0.2.whatever? :)
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 18:21:46+00:00
I got pythonista and can confirm the error...
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 18:27:02+00:00
I'll dig into the guts later today but for now I got the issue logged.
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 18:38:11+00:00
Phew! Glad it's not just me. TBH I've been figuring out how to streamline the process of coding then uploading the changed file to one of my remote Pythons that still work. Thanks for testing tgis, it's appreciated!
---------------------------------
@33MHz: [u:1+f+F]
2018-02-01 18:49:40+00:00
I suspect funky wheels. Why does it reference winreg and HKEY?
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 20:16:05+00:00
Oh interesting, I think it has to do with a pythonista specific library
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 20:20:12+00:00
Yeah that's the problem. It's the six package that has a bug in it.
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 20:28:56+00:00
Okay yep, the version of six that ships with Pythonista has a bug which causes it to incorrectly import winreg.
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 20:29:14+00:00
Work around is to manually install the updated version of six prior to installing pnutpy
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 20:38:59+00:00
@thrrgilag Trying it now!
---------------------------------
@bazbt3: [u:175+f+F]
2018-02-01 20:41:09+00:00
@thrrgilag @33MHz Very many thanks. Working again! {huggses} :)
---------------------------------
@thrrgilag: [u:9+f+F]
2018-02-01 20:44:06+00:00
Cool I'll assemble some notes on it and determine if we need to make some adjustments for that situation should it crop up…eeeelsewhere. it and determine if we need to make some adjustments for that situation should it crop up elsewhere.ut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment