[duplicate reply as the first seems to have disappeared]

In article 
<cacgdh2hoqfsdrfdpblnheeppowquoqskf_bgdovga7+z05e...@mail.gmail.com>,
 Paul Wiseman <poal...@gmail.com> wrote:
> I don't think it's either of those. I think that hashlib.py must have
> changed in 2.7.9 from 2.7.8 (no longer has _hashlib.openssl_md_meth_names) so
> the built app (running 2.7.8) expected that attribute to be there, but
> somehow py2app or my usage of it is causing it to look in the system
> libraries over the frozen libraries. Installing 2.7.8 again hides the issue
> because whichever hashlib it uses would have the same behaviour because
> they'll be identical (both from v2.7.8)
> > In any case, a fresh install seems to have solved the problem.
> > On Dec 1, 2014, at 7:29 AM, Paul Wiseman <poal...@gmail.com> wrote:
> > I have a frozen app installed (built on a different machine using python
> > 2.7.8 32/ppc)
> >
> > I Installed python 2.7.9rc1 (32/pcc python.org installer) and I started
> > seeing errors from the built app on startup
> >
> > the error occurred from import hashlib
> >
> >   File
> > "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py"
> > ,
> > line 138, in <module>
> >     _hashlib.openssl_md_meth_names)
> > AttributeError: 'module' object has no attribute 'openssl_md_meth_names'
> >
> > Installing 2.7.8 again on this machine, and the frozen app started working
> > again with no other changes.
> >
> > Is this a problem with my setup or an issue with the freezing process?

The whole point of using py2app in normal, non-alias mode is to provide 
a self-contained, standalone app not dependent on any external 
Python-provided infrastructure, e.g. py files or extension modules or 
shared libs so something is wrong here.  The 'openssl_md_meth_names' was 
added to _hashlib.so for 2.7.9 (along with a lot of other changes to 
support the backport of upgraded ssl functionality from Python 3) so 
what appears to be happening here is that something in your app is 
incorrectly importing hashlib.py from the 2.7.9 installation in 
/Library/Frameworks along with (correctly) importing _hashlib.so from 
your py2app-produced app bundle.  I'm no expert on py2app but I did 
verify that a very simple app that used hashlib and was built with a 
current py2app and 2.7.8 did, in fact, work correctly when run in the 
presence of 2.7.9rc1.  So the question is what is going on with your 
app.  Questions that come to mind: (1) What is the full traceback (e.g. 
which file causes hashlib to be imported)?  (2) What is the value of 
sys.path at that point?  (3) What third-party modules are installed in 
the app and were any installed after using py2app?

-- 
 Ned Deily,
 n...@acm.org

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
https://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to