From: Scott H. <sl...@ho...> - 2001-09-05 00:09:41
|
Finn, Thanks for the tip. That got rid of the codecs message. Now, I get a java security error. Things work ok from jython, but when in an applet, I get the error. So, I guess that Java realizes that I am trying to download a file and stops it? Is there any way to do what I am trying to do (download a file without user intervention)? Thanks, Scott ----- Original Message ----- From: "Finn Bock" <bc...@wo...> To: <jyt...@li...> Cc: "Scott Hathaway" <sl...@ho...> Sent: Tuesday, September 04, 2001 2:17 PM Subject: Re: [Jython-users] is urllib compatible with jython? > [Scott Hathaway] > > >After much help from Robet Bill, I have my applet issues down to a = > >single problem. If I take out the urllib.urlretrieve calls, the applet = > >works ok. If I leave them in, it dies with a message about not being = > >able to find the codec (the exact message is below): > > > >Lookup Error: no codec search functions registered: can't find = > >encoding > > > >Does anyone know what this means and how to get around it? > > It is caused by this bug: > > > http://sourceforge.net/tracker/?group_id=12867&atid=112867&func=detail&aid=4 48523 > > where the builtin "ascii" codec wasn't found when requesting the use of > the "ASCII" codec (which is what urllib is doing). > > Try add a dummy function like this: > > def dummy_jythonc(): > import encodings.ascii > > The dummy method shouldn't be called at all. It just have to be there so > that jythonc can see it and include the codec in the resulting .jar > file. > > The bug will be fixed in the 2.1b1 release. > > regards, > finn > > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |