Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AttributeError when calling pyhton scripts from java class

 
eswari Malluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am a java developer and new to python. I have a code in python which as to be used in my project, so tried to call these python scripts from a java class using Python Interpreter and getting the AttibuteError as below:
AttributeError: 'javapackage' object has no attribute 'newevent'

Please help me how to resolve this error.

Thanks,
Eshwari
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you show us both the relevant Python and the relevant Java code?
 
eswari Malluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob Spoor,

Thank you for reading my post.

Here is the python script I am using.......





and the Java code is..





Here I am getting error at this line in the python script

(BuilderErrorEvent,EVT_BUILDER_ERROR) = wx.lib.newevent.NewEvent()

where wx is the local folder


Thanks,
Eshwari

[RS]added code tags[/RS]
 
Rob Spoor
Sheriff
Pie
Posts: 20667
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is in your Python code, so I think you'll get better answers if I move this thread to our Python form.
 
eswari Malluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, please move this to Python forum

Thank You,
Eshwari
 
eswari Malluru
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can anyone please tell why I am getting this error. Its urgent to resolve this AttributeError. When will errors like this come.

Thanks,
Eshwari
 
Matt Cartwright
Ranch Hand
Posts: 152
Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is in 'TestClasses' ?

did you try 'import wx' or 'from wx.lib.newevent import NewEvent'?

NewEvent is a Java class, I assume...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic