opentelekomcloud / python-otcclient

(Obsolete) Python bindings to the T-Systems OTC API
MIT License
15 stars 20 forks source link

syntaxError after import #72

Closed frankenstein91 closed 5 years ago

frankenstein91 commented 5 years ago

My script until now...

import sys
import os

from otcclient.core.userconfigaction import userconfigaction
from otcclient.core.OtcConfig import OtcConfig
from otcclient.plugins.ecs.ecs import ecs

I get his error in python:

Traceback (most recent call last):
  File "/home/frank/AtomProjects/OTCC/test.py", line 4, in <module>
    from otcclient.core.userconfigaction import userconfigaction
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/core/userconfigaction.py", line 8, in <module>
    from otcclient.core.configloader import configloader
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/core/configloader.py", line 18, in <module>
    from otcclient.core.pluginmanager import getplugin
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/core/pluginmanager.py", line 67, in <module>
    initPlugins()
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/core/pluginmanager.py", line 43, in initPlugins
    p = load_from_file(location)    
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/core/pluginmanager.py", line 22, in load_from_file
    py_mod = imp.load_source(mod_name, filepath)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "/home/frank/AtomProjects/OTCC/venv/lib/python3.7/site-packages/otcclient/plugins/ecs/ecs.py", line 1382
    print url
            ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(url)?
make-ing commented 5 years ago

This happens to me also when I use python3. I'm not sure if this module is really python3 compatible.

zsoltn commented 5 years ago

Thanks the report. Please recheck with =>0.3.64 version.