[PyQt] pytz and timezones....
John M. Hackett
john.hackett at icon-is.co.uk
Tue Nov 24 14:55:07 GMT 2015
My App builds but a "UnknownTimeZoneError" is thrown by pytz/__init__.pyo when it is run.
I've put various logging lines and its looks to me as if the issue is where this file tries to confirm the existence of the zoneinfo file(s): for each tz in a hardcoded array it checks to see if it can open the file defined as:
filename = os.path.join(os.path.dirname(__file__),'zoneinfo', *name_parts)
This generates something like ":/pytz/zoneinfo/Europe/London".
Now the question is what does the ":" represent? The actual path to the pre-build file is , in this example, "$SYSROOT/resources/pytz/zoneinfo/Europe/London" which does exist.
So, when pyqtdeploy builds the App does the ":" in the filename above represent the "internal" root of the App so that when it tries to open this file it is looking within the App's own directory structure and not some "real" path?
If this is not the case and it is trying to open a file external to the app and within the general filesystem how can I get to read the zoneinfo which is, I assume, being embedded in the App as a resource?
Icon Information Systems
74 Gibsons Hill, Norbury, London, SW16 3JS
t: 020 8764 2663
f: 020 8711 3370
e: john.hackett at icon-is.co.uk
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt