Issue1001
Created on 2008年02月28日.09:31:29 by leo_sakaguchi, last changed 2012年06月24日.08:45:33 by tyh73bac.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | Remove |
| test.py | leo_sakaguchi, 2008年02月28日.09:31:28 | |||
| prop1.html | cen71ugu, 2012年06月07日.19:29:26 | |||
| prop2.html | cen71ugu, 2012年06月07日.19:29:35 | |||
| prop3.html | cen71ugu, 2012年06月07日.19:29:44 | |||
| prop4.html | cen71ugu, 2012年06月07日.19:29:54 | |||
| prop5.html | cen71ugu, 2012年06月07日.19:30:08 | |||
| prop6.html | cen71ugu, 2012年06月07日.19:30:19 | |||
| prop7.html | cen71ugu, 2012年06月07日.19:30:30 | |||
| prop8.html | cen71ugu, 2012年06月07日.19:30:42 | |||
| prop9.html | cen71ugu, 2012年06月07日.19:30:52 | |||
| prop10.html | cen71ugu, 2012年06月07日.19:31:09 | |||
| prop11.html | cen71ugu, 2012年06月07日.19:31:18 | |||
| prop12.html | cen71ugu, 2012年06月07日.19:31:30 | |||
| prop13.html | cen71ugu, 2012年06月07日.19:31:43 | |||
| prop14.html | cen71ugu, 2012年06月07日.19:31:54 | |||
| prop15.html | cen71ugu, 2012年06月07日.19:32:06 | |||
| prop16.html | cen71ugu, 2012年06月07日.19:32:16 | |||
| prop17.html | cen71ugu, 2012年06月07日.19:32:26 | |||
| prop18.html | cen71ugu, 2012年06月07日.19:32:37 | |||
| prop19.html | cen71ugu, 2012年06月07日.19:32:48 | |||
| prop20.html | cen71ugu, 2012年06月07日.19:32:58 | |||
| prop21.html | cen71ugu, 2012年06月07日.19:33:10 | |||
| prop22.html | cen71ugu, 2012年06月07日.19:33:20 | |||
| prop23.html | cen71ugu, 2012年06月07日.19:33:30 | |||
| prop24.html | cen71ugu, 2012年06月07日.19:33:41 | |||
| prop25.html | cen71ugu, 2012年06月07日.19:33:55 | |||
| prop26.html | cen71ugu, 2012年06月07日.19:34:06 | |||
| prop27.html | cen71ugu, 2012年06月07日.19:34:20 | |||
| prop28.html | cen71ugu, 2012年06月07日.19:34:35 | |||
| prop29.html | cen71ugu, 2012年06月07日.19:34:45 | |||
| prop30.html | cen71ugu, 2012年06月07日.19:34:55 | |||
| prop31.html | cen71ugu, 2012年06月07日.19:35:08 | |||
| prop32.html | cen71ugu, 2012年06月07日.19:35:22 | |||
| prop33.html | cen71ugu, 2012年06月07日.19:35:36 | |||
| prop34.html | cen71ugu, 2012年06月07日.19:36:05 | |||
| prop35.html | cen71ugu, 2012年06月07日.19:36:16 | |||
| prop36.html | cen71ugu, 2012年06月07日.19:36:30 | |||
| prop37.html | cen71ugu, 2012年06月07日.19:36:41 | |||
| prop38.html | cen71ugu, 2012年06月07日.19:36:51 | |||
| prop39.html | cen71ugu, 2012年06月07日.19:37:03 | |||
| prop40.html | cen71ugu, 2012年06月07日.19:37:13 | |||
| prop41.html | cen71ugu, 2012年06月07日.19:37:23 | |||
| prop42.html | cen71ugu, 2012年06月07日.19:37:33 | |||
| prop43.html | cen71ugu, 2012年06月07日.19:37:55 | |||
| prop44.html | cen71ugu, 2012年06月07日.19:38:04 | |||
| prop45.html | cen71ugu, 2012年06月07日.19:38:14 | |||
| prop46.html | cen71ugu, 2012年06月07日.19:38:25 | |||
| prop47.html | cen71ugu, 2012年06月07日.19:38:34 | |||
| prop48.html | cen71ugu, 2012年06月07日.19:38:45 | |||
| Messages | |||
|---|---|---|---|
| msg3053 (view) | Author: Leo Sakaguchi (leo_sakaguchi) | Date: 2008年02月28日.09:31:27 | |
Symptom: Attached Jython program doesn't work as intended on Jython 2.2 and 2.2.1. It works fine on Jython 2.1. Tried it with Sun Java 1.5.0_13. The program should print System.currentTimeMillis() per each 5 seconds for 60 seconds period (12-13 times), but with Jython 2.2, it won't print anything then finishes after 60 seconds. The program uses java.util.concurrent libraries which are available at Java 5.0 and later. Not sure where the root cause relies. |
|||
| msg3054 (view) | Author: Charlie Groves (cgroves) | Date: 2008年02月28日.17:38:59 | |
System.currentTimeMillis returns a long which is wrapped in a PyLong when exposed to Python. As of 2.2, PyLong is a newstyle type so it only exposes python methods on it. In 2.1 it mistakenly exposed the Java method toString. Your System.currentTimeMillis().toString() throws an AttributeError looking for toString. You can use str(System.currentTimeMillis()) instead. |
|||
| msg3055 (view) | Author: Leo Sakaguchi (leo_sakaguchi) | Date: 2008年02月29日.02:00:30 | |
Thanks a lot pointing out the problem, also for a very agile answer. That solved my problem. > Your System.currentTimeMillis().toString() throws an > AttributeError looking for toString. How did you figure out the exception? No exception occurs when I ran the program natively. Do I need to put some debug options to Jython so it runs in debug mode? If I know the way, I'll use it next time. Thanks! |
|||
| msg3056 (view) | Author: Charlie Groves (cgroves) | Date: 2008年02月29日.17:15:12 | |
>> Your System.currentTimeMillis().toString() throws an >> AttributeError looking for toString. >How did you figure out the exception? No exception occurs when I ran >the program natively. Do I need to put some debug options to Jython so >it runs in debug mode? If I know the way, I'll use it next time. >Thanks! The exception not showing actually has to do with java.util.concurrent, not Jython. When an exception is thrown by code run in an ScheduledExcutionThreadService, there's no where for the exception to be caught immediately, so concurrent can't just print it out to the console because it isn't sure that you don't want to catch it. However, when you call get on the ScheduledFuture returned by schedule, it throws an ExecutionException if the scheduled code threw and exception while it was running. The ExcecutionException thrown will return the original exception from getCause. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2012年06月24日 08:45:33 | tyh73bac | set | files: - prop1.html |
| 2012年06月24日 08:15:01 | tyh73bac | set | files: + prop1.html |
| 2012年06月07日 19:38:45 | cen71ugu | set | files: + prop48.html |
| 2012年06月07日 19:38:34 | cen71ugu | set | files: + prop47.html |
| 2012年06月07日 19:38:25 | cen71ugu | set | files: + prop46.html |
| 2012年06月07日 19:38:14 | cen71ugu | set | files: + prop45.html |
| 2012年06月07日 19:38:04 | cen71ugu | set | files: + prop44.html |
| 2012年06月07日 19:37:55 | cen71ugu | set | files: + prop43.html |
| 2012年06月07日 19:37:33 | cen71ugu | set | files: + prop42.html |
| 2012年06月07日 19:37:24 | cen71ugu | set | files: + prop41.html |
| 2012年06月07日 19:37:13 | cen71ugu | set | files: + prop40.html |
| 2012年06月07日 19:37:04 | cen71ugu | set | files: + prop39.html |
| 2012年06月07日 19:36:51 | cen71ugu | set | files: + prop38.html |
| 2012年06月07日 19:36:41 | cen71ugu | set | files: + prop37.html |
| 2012年06月07日 19:36:31 | cen71ugu | set | files: + prop36.html |
| 2012年06月07日 19:36:16 | cen71ugu | set | files: + prop35.html |
| 2012年06月07日 19:36:06 | cen71ugu | set | files: + prop34.html |
| 2012年06月07日 19:35:37 | cen71ugu | set | files: + prop33.html |
| 2012年06月07日 19:35:23 | cen71ugu | set | files: + prop32.html |
| 2012年06月07日 19:35:08 | cen71ugu | set | files: + prop31.html |
| 2012年06月07日 19:34:56 | cen71ugu | set | files: + prop30.html |
| 2012年06月07日 19:34:46 | cen71ugu | set | files: + prop29.html |
| 2012年06月07日 19:34:35 | cen71ugu | set | files: + prop28.html |
| 2012年06月07日 19:34:20 | cen71ugu | set | files: + prop27.html |
| 2012年06月07日 19:34:06 | cen71ugu | set | files: + prop26.html |
| 2012年06月07日 19:33:55 | cen71ugu | set | files: + prop25.html |
| 2012年06月07日 19:33:42 | cen71ugu | set | files: + prop24.html |
| 2012年06月07日 19:33:30 | cen71ugu | set | files: + prop23.html |
| 2012年06月07日 19:33:20 | cen71ugu | set | files: + prop22.html |
| 2012年06月07日 19:33:10 | cen71ugu | set | files: + prop21.html |
| 2012年06月07日 19:32:59 | cen71ugu | set | files: + prop20.html |
| 2012年06月07日 19:32:48 | cen71ugu | set | files: + prop19.html |
| 2012年06月07日 19:32:37 | cen71ugu | set | files: + prop18.html |
| 2012年06月07日 19:32:27 | cen71ugu | set | files: + prop17.html |
| 2012年06月07日 19:32:16 | cen71ugu | set | files: + prop16.html |
| 2012年06月07日 19:32:07 | cen71ugu | set | files: + prop15.html |
| 2012年06月07日 19:31:55 | cen71ugu | set | files: + prop14.html |
| 2012年06月07日 19:31:43 | cen71ugu | set | files: + prop13.html |
| 2012年06月07日 19:31:31 | cen71ugu | set | files: + prop12.html |
| 2012年06月07日 19:31:19 | cen71ugu | set | files: + prop11.html |
| 2012年06月07日 19:31:09 | cen71ugu | set | files: + prop10.html |
| 2012年06月07日 19:30:53 | cen71ugu | set | files: + prop9.html |
| 2012年06月07日 19:30:43 | cen71ugu | set | files: + prop8.html |
| 2012年06月07日 19:30:30 | cen71ugu | set | files: + prop7.html |
| 2012年06月07日 19:30:19 | cen71ugu | set | files: + prop6.html |
| 2012年06月07日 19:30:08 | cen71ugu | set | files: + prop5.html |
| 2012年06月07日 19:29:54 | cen71ugu | set | files: + prop4.html |
| 2012年06月07日 19:29:45 | cen71ugu | set | files: + prop3.html |
| 2012年06月07日 19:29:36 | cen71ugu | set | files: + prop2.html |
| 2012年06月07日 19:29:28 | cen71ugu | set | files: + prop1.html |
| 2012年06月04日 20:08:08 | cen71ugu | set | files: - 1.html |
| 2012年06月04日 20:07:58 | cen71ugu | set | files: + 1.html |
| 2008年02月29日 17:15:13 | cgroves | set | messages: + msg3056 |
| 2008年02月29日 02:00:31 | leo_sakaguchi | set | messages: + msg3055 |
| 2008年02月28日 17:38:59 | cgroves | set | status: open -> closed resolution: wont fix messages: + msg3054 nosy: + cgroves |
| 2008年02月28日 09:31:29 | leo_sakaguchi | create | |
Supported by Python Software Foundation,
Powered by Roundup