Message1530
ENVIRONMENT: Jython 2.2b1 on java1.5.0_07 (JIT: null) on Mac OS X 10.4.8
When jython encounters a incorrectly named imported java class it fails silently; Here's an example. Below is it the imports of my jython module and the first funciton in the module. The line 'from org.mbari.vcr import Timecode' is bogus; it should be 'from org.mbari.movie import Timecode'. The jython class is created up to the bogus line
# Start module - mbari.eitsdb
import exceptions
import mbari.aveddb
from org.mbari.vars.annotation.model import Association
from org.mbari.vars.annotation.model import CameraData
from org.mbari.vars.annotation.model import CameraPlatformDeployment
from org.mbari.vars.annotation.model import Observation
from org.mbari.vars.annotation.model import PhysicalData
from org.mbari.vars.annotation.model import VideoArchive
from org.mbari.vars.annotation.model import VideoArchiveSet
from org.mbari.vars.annotation.model import VideoFrame
from org.mbari.vars.annotation.model.dao import VideoArchiveDAO
from org.mbari.vars.annotation.model.dao import VideoArchiveSetDAO
from org.mbari.vcr import Timecode # <-- MISNAMED IMPORT
from org.slf4j import Logger
from org.slf4j import LoggerFactory
def importEvents(url, frameRate):
pass
This is the result of trying to load the module:
>>> import mbari.eitsdb
>>> dir(mbari.eitsdb)
['Association', 'CameraData', 'CameraPlatformDeployment', 'Observation', 'PhysicalData', 'VideoArchive', 'VideoArchiveDAO', 'VideoArchiveSet', 'VideoArchiveSetDAO', 'VideoFrame', '__doc__', '__file__', '__name__', 'exceptions', 'mbari']
>>> mbari.eitsdb.importEvents(url, frameRate)
AttributeError: module 'mbari.eitsdb' has no attribute 'importEvents'
So Jython is loading the module up to the point that it encounters a bad import, but it fails silently so it appears the module loaded fine, until I try to access a method that is in the module after the bogus line. |
|
Date |
User |
Action |
Args |
2008-02-20 17:17:46 | admin | link | issue1674537 messages |
2008-02-20 17:17:46 | admin | create | |
|