Re: LookupError: no codec search functions registered: can't find encoding 'iso-8859-1'
Jim Baker <[email protected]>
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <CAOhO=aPgtRbwchLJsSrdiunUxbXfE8cxofdt98sWz0VQqKD54w@mail.gmail.com> |
David, For me, this is a very tough question to address since you're running on an unsupported release. However, I understand why, due to the fact that we roughly doubled the size of the jython.jar from beta 1 to 2.7.0 to 27MB. Since I'm the one person most responsible for that size increase, my apologies, I don't like it either. These size increases are all from including additional libraries. The biggest addition is ICU4J, at 11MB, which is only used to provide full unicodedata and encodings.idna support; and BouncyCastle and Netty 4, at 4.5MB, which are used to support ssl, select, and socket. Both encoding and socket support in turn then provide support for requests; which when vendored, in turn supports pip and the PyPI ecosystem for Jython. Our primary goal for Jython 2.7 is to provide a highly compatible implementation of version 2.7 of the Python language and standard libraries; and the corresponding ecosystem. I think we have done a good job with that, and current work on the forthcoming 2.7.1 release continues to improve on this goal as well. However, this does not mean that there needs to be just one profile of Jython 2.7.x that is used. In particular, I understand from discussion on #jython that certain users have been successful in stripping the Jython runtime to only 7MB, because they don't need support for sockets, ssl, etc, mostly because the container already provides this support; or they directly use Java. You might also combine: build out your site-packages with the standard full profile of Jython 2.7, then run it with the reduced set. So here's the challenge for our users: can we identify one or more useful profiles of Jython where we have excluded files from the jython.jar; and share these exclusions? (Maybe we could collect here on this email thread.) I recommend we define these profiles in terms of Gradle, given that we are planning to use Gradle to replace the Ant build script real soon now (probably once we start 2.7.2). In particular, it's easy enough to specify in Gradle with the jar task: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.bundling.Jar.html#org.gradle.api.tasks.bundling.Jar:excludes So that's where I would start. Note that automated tools most likely will not work due to the fact that Jython is so dynamic, unless they observe the use of ClassLoaders. (Maybe there are such tools we can use!) - Jim On Fri, Oct 16, 2015 at 11:32 AM, David Charles <[email protected]> wrote: > I have a Jython application based on 2.7b1 that I have packaged into a > *.jar file for deployment via Java Webstart. (Every other Beta release > presented a problem to me, and the official release is just sooo big.) I > used to be able to run my application with a command like this: > > $ java -jar myapp.jar > > But this no longer works. Now, I application immediately dies with an > exception: > > Exception in thread "MainThread" Traceback (most recent call last): > File "<string>", line 1, in <module> > File "__pyclasspath__/myapp/__init__.py", line 38, in <module> > File "__pyclasspath__/myap/style.py", line 9, in <module> > File "__pyclasspath__/resourceloading.py", line 7, in <module> > LookupError: no codec search functions registered: can't find encoding > 'iso-8859-1' > > I searched teh Interwebs, but I appear to be alone in this unpleasant > condition. > > I get the same exception on both Java 8u60 and 7u75. My OS is Ubuntu > 11.04. > > Any hints on how to proceed? > > Thanks Jythonwizards, > David > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jython-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jython-users > > ------------------------------------------------------------------------------ _______________________________________________ Jython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jython-users