it's unlikely we can do much about that, jython is hardly used at all 
and is not a well-maintained platform; it regularly has subtle 
interpreter bugs and such.  pg8000 is in better shape these days but 
tracking down something like this would require careful pdb debugging 
and tracing.  That it's an intermittent bug makes it that much more 
difficult to track.

On Mon Jun 16 11:22:11 2014, tony.locke wrote:
> Hi, I'm using SQLAlchemy 0.8.6 on Jython 2.5.3 with the
> postgresql+pg8000 dialect, and I find I'm getting the following
> intermittent error when retrieving an attribute of a persistent
> object. The attribute is itself a persistent object. Any help would be
> most appreciated. Thanks, Tony.
>
> null org.python.core.PyException nullTraceback (most recent call last):
>
>   *
>   *   File "<string>", line 55, in <module>
>   *
>   *   File "<string>", line 55, in <module>
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py",
>     line 316, in __get__
>   *
>   *     return self.impl.get(instance_state(instance), dict_)
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py",
>     line 613, in get
>   *
>   *     value = self.callable_(state, passive)
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py",
>     line 524, in _load_for_state
>   *
>   *     return self._emit_lazyload(session, state, ident_key, passive)
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py",
>     line 563, in _emit_lazyload
>   *
>   *     return loading.load_on_ident(q, ident_key)
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py",
>     line 226, in load_on_ident
>   *
>   *     return q.one()
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py",
>     line 226, in load_on_ident
>   *
>   *     return q.one()
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\query.py",
>     line 2323, in one
>   *
>   *     ret = list(self)
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py",
>     line 72, in instances
>   *
>   *     rows = [process[0](row, None) for row in fetch]
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py",
>     line 356, in _instance
>   *
>   *     tuple([row[column] for column in pk_cols])
>   *
>   *   File "D:\Program Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\engine\result.py",
>     line 91, in __getitem__
>   *
>   *     return self._row[index]
>   *
>   * IndexError: index out of range: 0
>   *
>   *
>   *
>   *   at org.python.core.Py.IndexError(Py.java:250)
>   *
>   *   at
>     
> org.python.core.SequenceIndexDelegate.checkIdxAndGetItem(SequenceIndexDelegate.java:63)
>   *
>   *   at org.python.core.PySequence.seq___getitem__(PySequence.java:305)
>   *
>   *   at org.python.core.PySequence.__getitem__(PySequence.java:301)
>   *
>   *   at sqlalchemy.engine.result$py.__getitem__$9(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\engine\result.py:91)
>   *
>   *   at sqlalchemy.engine.result$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\engine\result.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:327)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:124)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:115)
>   *
>   *   at
>     org.python.core.PyObjectDerived.__getitem__(PyObjectDerived.java:900)
>   *
>   *   at sqlalchemy.orm.loading$py._instance$9(D:\Program Files\Apache
>     Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py:497)
>   *
>   *   at sqlalchemy.orm.loading$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:149)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:327)
>   *
>   *   at sqlalchemy.orm.loading$py.instances$1(D:\Program Files\Apache
>     Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py:56)
>   *
>   *   at sqlalchemy.orm.loading$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyGenerator.__iternext__(PyGenerator.java:149)
>   *
>   *   at org.python.core.PyGenerator.__iternext__(PyGenerator.java:131)
>   *
>   *   at
>     org.python.core.WrappedIterIterator.hasNext(WrappedIterIterator.java:23)
>   *
>   *   at org.python.core.PyList.list___init__(PyList.java:112)
>   *
>   *   at org.python.core.PyList$exposed___new__.createOfType(Unknown
>     Source)
>   *
>   *   at
>     org.python.core.PyOverridableNew.new_impl(PyOverridableNew.java:12)
>   *
>   *   at org.python.core.PyType.invokeNew(PyType.java:466)
>   *
>   *   at org.python.core.PyType.type___call__(PyType.java:1558)
>   *
>   *   at org.python.core.PyType.__call__(PyType.java:1548)
>   *
>   *   at org.python.core.PyObject.__call__(PyObject.java:387)
>   *
>   *   at org.python.core.PyObject.__call__(PyObject.java:391)
>   *
>   *   at sqlalchemy.orm.query$py.one$105(D:\Program Files\Apache
>     Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\query.py:2331)
>   *
>   *   at sqlalchemy.orm.query$py.call_function(D:\Program Files\Apache
>     Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\query.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:134)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:317)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:109)
>   *
>   *   at sqlalchemy.orm.loading$py.load_on_ident$6(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py:228)
>   *
>   *   at sqlalchemy.orm.loading$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\loading.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:141)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:327)
>   *
>   *   at sqlalchemy.orm.strategies$py._emit_lazyload$48(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py:599)
>   *
>   *   at sqlalchemy.orm.strategies$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:194)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:387)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:170)
>   *
>   *   at sqlalchemy.orm.strategies$py._load_for_state$46(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py:524)
>   *
>   *   at sqlalchemy.orm.strategies$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\strategies.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:338)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:139)
>   *
>   *   at sqlalchemy.orm.attributes$py.get$42(D:\Program Files\Apache
>     Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py:635)
>   *
>   *   at sqlalchemy.orm.attributes$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:301)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:157)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:338)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:139)
>   *
>   *   at sqlalchemy.orm.attributes$py.__get__$21(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py:316)
>   *
>   *   at sqlalchemy.orm.attributes$py.call_function(D:\Program
>     Files\Apache Software Foundation\Tomcat
>     7.0\webapps\chellow\WEB-INF\lib-python\sqlalchemy\orm\attributes.py)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyBaseCode.call(PyBaseCode.java:166)
>   *
>   *   at org.python.core.PyFunction.__call__(PyFunction.java:338)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:139)
>   *
>   *   at org.python.core.PyMethod.__call__(PyMethod.java:130)
>   *
>   *   at
>     org.python.core.PyObjectDerived.__get__(PyObjectDerived.java:1014)
>   *
>   *   at org.python.core.PyObject.object___findattr__(PyObject.java:3706)
>   *
>   *   at org.python.core.Deriveds.__findattr_ex__(Deriveds.java:42)
>   *
>   *   at
>     org.python.core.PyObjectDerived.__findattr_ex__(PyObjectDerived.java:983)
>   *
>   *   at org.python.core.PyObject.__getattr__(PyObject.java:923)
>   *
>   *   at org.python.pycode._pyx700.f$0(<string>:173)
>   *
>   *   at org.python.pycode._pyx700.call_function(<string>)
>   *
>   *   at org.python.core.PyTableCode.call(PyTableCode.java:165)
>   *
>   *   at org.python.core.PyCode.call(PyCode.java:18)
>   *
>   *   at org.python.core.Py.runCode(Py.java:1275)
>   *
>   *   at org.python.core.Py.exec(Py.java:1319)
>   *
>   *   at
>     org.python.util.PythonInterpreter.exec(PythonInterpreter.java:206)
>
> --
> You received this message because you are subscribed to the Google
> Groups "sqlalchemy" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to