shareplum icon indicating copy to clipboard operation
shareplum copied to clipboard

SyntaxError while importing Office365 from shareplum

Open matija888 opened this issue 5 years ago • 1 comments
trafficstars

I've got an error when importing from shareplum import Office365, Site

Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/***/script.py", line 6, in <module>
    from shareplum import Office365, Site
  File "/home/***/flaskvenv/lib/python3.5/site-packages/shareplum/__init__.py", line 5, in <module>
    from .office365 import Office365  # noqa: F401
  File "/home/***/flaskvenv/lib/python3.5/site-packages/shareplum/office365.py", line 6, in <module>
    from .request_helper import post
  File "/home/***/flaskvenv/lib/python3.5/site-packages/shareplum/request_helper.py", line 2, in <module>
    from .errors import ShareplumRequestError
  File "/home/***/flaskvenv/lib/python3.5/site-packages/shareplum/errors.py", line 4
    super().__init__(f"{msg} : {details}")
                                        ^

This error has been raised on Ubuntu 16.04.3 with python version 3.5.2 Shareplum version: 0.5.1 pip version: 20.1.1

matija888 avatar May 19 '20 15:05 matija888

Update Python to at least 3.6. F-strings were introduced in Python 3.6.

tvuotila avatar May 22 '20 07:05 tvuotila