X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 01 Apr 2016 02:26 PM by  anon
Help using Python bridge
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
01 Apr 2016 02:26 PM
    Hello, I'd like to use the Python bridge to call some Python code and I'm having trouble getting some simple examples running. I'm using IDL 8.5 on Windows 7 and Windows 2012 R2 (same issue for both). I'm using Python 2.7 and sys.version: 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)] If I define a very simple python module (TestCode.py) as: # Simple Example def testrun(A,B,C,D): return A+B+C+D I figured I could import and run that code using: IDL> TestCode = Python.import('TestCode') IDL> result = TestCode.testrun(1,2,3,4) % PYTHON::_OVERLOADMETHOD: Incorrect number of arguments. % Execution halted at: $MAIN$ Unfortunately I get that incorrect number of arguments error and I'm not sure how to go about debugging it. I've also frequently seen the following error attempting to call python code, and am not sure what to make of it: % Tag name FLAGS is undefined for structure HASH. Any help would be greatly appreciated! Thanks!

    Deleted User



    Basic Member


    Posts:143
    Basic Member


    --
    08 Apr 2016 05:37 PM
    I helped Hunter with this issue. He indicated that upgrading to IDL 8.5.1 and setting up the environment using the directions in the following article helped with the problem: http://www.harrisgeospatial.com/Compa...
    You are not authorized to post a reply.