Python Wrapper Errors

  • hrschbck
  • Topic Author
More
20 Feb 2015 22:14 #3099 by hrschbck
Python Wrapper Errors was created by hrschbck
Hi -

I'm having some issues getting some of the sample Python 2.7 files up and running, specifically utilityrate3.py

When I run utilityrate3.py, I am getting the following issues:

C:\Python27\python.exe C:/SAM/2015.1.30/SDK/languages/python/utilityrate3.py
Traceback (most recent call last):
File "C:/SAM/2015.1.30/SDK/languages/python/utilityrate3.py", line 3, in
import ssc # contains all Python classes for accessing ssc
File "C:\SAM\2015.1.30\SDK\languages\python\ssc.py", line 13, in
class SSCAPI:
File "C:\SAM\2015.1.30\SDK\languages\python\ssc.py", line 17, in SSCAPI
_dll = CDLL("../../win64/ssc.dll")
File "C:\Python27\lib\ctypes\__init__.py", line 365, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] The specified module could not be found

Have you had users with the problems discussed?

If so, was there a resolution?

Thanks

Please Log in or Create an account to join the conversation.

  • hrschbck
  • Topic Author
More
23 Feb 2015 13:39 #3100 by hrschbck
Replied by hrschbck on topic Python Wrapper Errors
I've [sort of] solved this myself.

On one machine with a Python 3.4 and 2.7 installation, in order to get some non-related error fixed, I've customized some changes to the registry (mainly related to Visual Studio and C++). This has caused some errors in running the Python examples in the SDK.

When I use the SDK code on another machine with the stock Python 2.7 install, it would perfectly.

If you are having the same problem, try running the code in a fresh Python 2.7 environment (a new machine or virtual setup).

Please Log in or Create an account to join the conversation.

  • Angus King
More
10 Apr 2015 09:48 #3101 by Angus King
Replied by Angus King on topic Python Wrapper Errors
I've encountered similar issues using Python with the SDK API under Windows. I'm running a minimalist Windows guest just for the SDK so don't have (any other copy of) MSVCP120.dll installed. I've solved the problem by adding the location of the SAM SDK (ssc.dll, MSVCP120.dll, ...) to the PATH environment variable, via an extra statement in ssc.py:

os.environ["PATH"] += os.pathsep + sam_sdk_location

Hope this helps others who may be encountering similar problems (or prompts them to tell me where I've gone wrong :-)

AnGus

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum