Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2015-01-26 21:53:48

mdyason
Member
Registered: 2015-01-20
Posts: 43

Error loading Python wrapper

Hi

I am new to both Python and Json so this is probably simply a lack of understanding.
I loaded the thirdlight Python package using pip.  Seems to be fine.
When I run import thirdlight I get the following:

>>> import thirdlight
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.4\helpers\pydev\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
  File "C:\Python34\lib\site-packages\thirdlight.py", line 31, in <module>
    from types import DictType
ImportError: cannot import name 'DictType'

I found reference on line saying that DictType is no longer used after Python 3.1.  I am using 3.4.  Is there an easy fix for this or would I be better off just abandoning the idea of using the thirdlight Python package?
I am hoping that all I have to do is edit thirdlight.py to change every reference of "DictType" to something else and change the import statement.

Thanks for any help.

Last edited by mdyason (2015-01-26 22:19:17)

Offline

#2 2015-01-27 00:12:55

mdyason
Member
Registered: 2015-01-20
Posts: 43

Re: Error loading Python wrapper

I unistalled all python and packages.  Installed python 2.7 and installed thirdlight again using pip.  Now am getting following:

>>> import thirdlight
>>> tl = ThirdLight('http://x.thirdlight.com', 'xxx')
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'ThirdLight' is not defined

Any ideas?

Last edited by mdyason (2015-01-27 00:22:13)

Offline

Board footer