Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
syntax error
#1
Hi

I am using python 2.6 and python-gitlab 0.21.2

But running I get this error which I do not understand as it looks ok to me

Error:
Traceback (most recent call last):  File "/usr/bin/gitlab", line 10, in <module>    load_entry_point('python-gitlab==0.21.2', 'console_scripts', 'gitlab')()  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point    return get_distribution(dist).load_entry_point(group, name)  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point    return ep.load()  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load    entry = __import__(self.module_name, globals(),globals(), ['__name__'])  File "/usr/lib/python2.6/site-packages/python_gitlab-0.21.2-py2.6.egg/gitlab/__init__.py", line 35, in <module>    from gitlab.v3.objects import *  # noqa  File "/usr/lib/python2.6/site-packages/python_gitlab-0.21.2-py2.6.egg/gitlab/v3/objects.py", line 2094    form = {r'variables[%s]' % k: v for k, v in six.iteritems(variables)}                                                     ^ SyntaxError: invalid syntax
Can anyone shed some light on this?

Thanks
Reply
#2
The error is possibly in some previous line (missing closing quote/parenthese/brace).

Btw, this seems to be a very old version? On GitHub current version is 7.X? Or is it a different package?
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#3
The error is related to installation. Please re-install and try it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Syntax error for "root = Tk()" dlwaddel 15 1,224 Jan-29-2024, 12:07 AM
Last Post: dlwaddel
Photo SYNTAX ERROR Yannko 3 402 Jan-19-2024, 01:20 PM
Last Post: rob101
  Syntax error while executing the Python code in Linux DivAsh 8 1,638 Jul-19-2023, 06:27 PM
Last Post: Lahearle
  Code is returning the incorrect values. syntax error 007sonic 6 1,244 Jun-19-2023, 03:35 AM
Last Post: 007sonic
  syntax error question - string mgallotti 5 1,335 Feb-03-2023, 05:10 PM
Last Post: mgallotti
  Syntax error? I don't see it KenHorse 4 1,278 Jan-15-2023, 07:49 PM
Last Post: Gribouillis
  Syntax error tibbj001 2 912 Dec-05-2022, 06:38 PM
Last Post: deanhystad
  Python-for-Android:p4a: syntax error in main.py while compiling apk jttolleson 2 1,875 Sep-17-2022, 04:09 AM
Last Post: jttolleson
  Mysql Syntax error in pymysql ilknurg 4 2,387 May-18-2022, 06:50 AM
Last Post: ibreeden
  Solving equation equal to zero: How to resolve the syntax error? alexfrol86 3 1,990 Feb-21-2022, 08:58 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020