OSX Python Version?
#1
Ok So I am setting up an old 2009 Mac Mini for some friends as an XBMC box (has a broadcom card etc). It's running 10.6 with Frodo 12.2

Now, I was under the impression that XBMC OSX uses system python, so I updated that to 2.7.5...however I am finding that my addon (Oz Weather in the Frodo Repo) - is crashing with an error that relates to Python 2.4 (and runs fine with the same code under Windows, Openelec, etc).

So - any ideas on that one? I spend very little time with OSX so while my stsem python appears to be 2.7 now (start term, run python) - xbmc is behaving as if it is using 2.4

(The error is that ftplib does note expose socket.create_connection. Has been fixed between 2.4 and 2.6 apparently - can't find the bug report right now but saw the fix was accepted between those versions).

Any help appreciated!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
I can confirm that even on an OSX with external Python installed, the XBMC internal one is being in use by Python add-ons.

Please add the following to any python add-on:
PHP Code:
import sys
print sys.version 

Here is the output for my MacBookPro:
Terminal:
Code:
2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]

And here from any xbmc add-on:
Code:
2.6.5 (r265:79063, Mar 17 2013, 17:02:20)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)]

Regarding your problem: even the internal Python of XBMC Eden and Frodo should be >= 2.6

And you know the game: Where is your xbmc Debug Log? Wink
You are (implicit) able to see the python version number in use (spot the end of the line "DEBUG: Process - Setting the Python path to" to see the python site-packages path which includes the system number).
My GitHub. My Add-ons:
Image
Reply
#3
@sphere - sorry for the slow response!

I gave my mac mini to some friends to use as their XBMC machine, but they live abotu 700km away so getting a debug log is going to be tough.

I do definitely know my addon (OzWeather in this case) - crashes on OSX but not Windows/OW, due to the error mentioned above. That's using OSX 10.6, although that shouldn't make a difference it seems.

Anyway - guess I am stuck on this until I can get some more mac hardware...which I generally try and avoid (great hardware though it is, I just can't bring myself to support Apple!).
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
OSX uses Python 2.6.5 on Frodo and Gotham

https://github.com/xbmc/xbmc/blob/Frodo/...kefile.osx
Reply
#5
I definitely believe you!

I'm stuck without a Mac. Basically, if you donwload OzWeather, configure it with a postcode of 5064 say, and then run it as your weather app. It will crash ... same code that works on OE/Windows. But I can't get the log to prove it - so unless anyone with a Mac has 5 spare minutes for me...

(otherwise I am visiting my friends at Christmas, might be able to get one then!)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#6
Here's the debug info from OSX. I also dumped out the URL you were requesting and the urllib2.Request object:

http://pastebin.ca/2476445
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
Hey Jonathan

Is that an error during config? I.e. while getting a location? That's not actually what I meant. Mind you that same '5076' postcode works fine on my Windows box just now.

I actually meant an error post configuration when it's running and downloading radar backgrounds etc.

Apparently the issues are worse than I thought?! I will have to look into that - makes no sense at first glance, there's no port specified and I don't think you have to with basic http

Many thanks
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#8
That's during config, yes. Doesn't matter what postcode you put in as it's throwing an exception prior to URL open. Dunno what the error actually means - does seem like an odd one as the request looks OK.

If I can't config it, I can't do much else. This is Gotham btw.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
EDIT: Ok, got it running on Alpha6. That one complained about no PIL being present.

Perhaps OSX isn't bundling PIL? Are they running it with the radar stuff turned on (without should be fine?)

EDIT2: Yes, without radar stuff on, Gotham Alpha 6 works fine with Glen Osmond weather.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
PIL was one issue I've hit before on OSX/iOS - though that was solved to be honest (certainly some ATV2 users seemed to work it out). The other error I hit was ftplib as in the first post.

I had onyl tried with Frodo on OSX before I gave away my Mac. I should have kept it maybe but it was a tossup between having a Mac debug platform or getting some friends on to XBMC so I chose the latter! I'm kinda evangelistic with my xbmc...

And yes, they are running with radar turned on - it's most of the point of the addon really, the radars - so you can watch the storms roll in etc (the radars pop up during pause with a modified DialogOnSeek etc.)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#11
Ask 'em if it works fine with the radar disabled. If so, there's a fair chance that it's PIL.

Though I should think Frodo would have included it just fine (else we would have heard about it!)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#12
IIRC it does work without the radar stuff.

But the error I was getting was not PIL - it was ftp related...damn it I wish I'd kept that Mac.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#13
Just confirming - here's an OSX debug log showing missing PIL on the Mac

(same code runs fine linux/windows)

http://xbmclogs.com/show.php?id=93888

(Looks like OSX running Gotham Alpha 11 - made by someone else)

I think there is a PIL problem with the Alphas...
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#14
please try the next nightly and report back if its working then ...
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#15
Ok don't have a mac so will try get someone to try for me, thanks!

(latest nightlies appear to be 8th/11th so I presume I wait for one after that...)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
OSX Python Version?0