Jython doesn't recognize regular imports on IntelliJ

Answered

Hello,

I have a simple Jython script inside a Java project with Gradle and when I open it on IntelliJ (after setting the Jython interpreter) the following imports are not recognized:

{code}

rom __future__ import with_statement
import sys
import os
import re
import traceback
from optparse import OptionParser
import pdb
import errno

{code}

Oddly enough, my Java imports work fine:

{code}

from com.XXX.YYY.common import MyCoolClass

{code}

Any ideas where I can look for issues?

 

Thanks,

--Jose

 

 

 

 

 

0
5 comments

Hi Jose,

There indeed seems to be some awful problem with our Jython support in Python plugin as I managed to reproduce your issue. I've just created a request about it in our tracker. Please follow it, we'll try to figure out what's going on and fix it by the upcoming release.

0
Avatar
Permanently deleted user

Hello Mikhail,

 

Thanks for looking into this. I left you a comment on the bug report (are you guys using JIRA? :-)) for a workaround. Let me know how it goes.

 

Thanks!

 

--Jose

0
Avatar
Permanently deleted user

Hi. There is a plan to fix this? IntelliJ 2018 still has that bug.

Thanks!

0

Hi Jose!

We will look into various issues related to Jython support at some point, but at the moment we are mostly focused on the problems of just released 2019.1 and lacking functionality in CPython support (unfortunately, there are still plenty of higher priority tickets). Sorry it takes so awfully long.

0
Avatar
Permanently deleted user

I hope I don;t have to wait another year to complain about Jython broken in IntelliJ 2019 :-)

Anyways thanks for looking into this.

0

Please sign in to leave a comment.