Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax !!! #116

Closed
sydoluciani opened this issue Dec 8, 2020 · 5 comments
Closed

SyntaxError: invalid syntax !!! #116

sydoluciani opened this issue Dec 8, 2020 · 5 comments

Comments

@sydoluciani
Copy link

sydoluciani commented Dec 8, 2020

Starting Plone docker container throw below Syntax Errors:

File "/plone/buildout-cache/eggs/plone.staticresources-1.3.2-py3.8.egg/plone/staticresources/static/components/jqtree/_entries/insert.py", line 44
    print 'rename %s to %s' % (old_filename, new_filename)

SyntaxError: invalid syntax
@mauritsvanrees
Copy link
Sponsor Member

This is when running buildout, right?
This is harmless. See the explanation.
Well, the explanation is for a slightly different situation, but it comes down to the same thing. This file needs to be included in the distribution, but is not actually used in production.

@sydoluciani
Copy link
Author

Hi @mauritsvanrees , you are right, it is a harmless syntax error because the print statement is only for information and log output but the syntax error is due to missing parantheses, adding parantheses should fix the problem. Python 2.7 accepts print statement with and without parantheses, but to be compatible with Python 3, print statement must have paranthesis.

@mauritsvanrees
Copy link
Sponsor Member

I know.
But the file is here in the source tree and it is automatically added because we somewhere depend on jqtree.
So when this is fixed in jqtree it will be fixed here as well.

BTW, I have not got the faintest idea of what jqtree actually is and what this file does. And there may be a newer version already that fixes this. But I can't imagine that this has any influence at all on how Plone runs.

@sydoluciani
Copy link
Author

@mauritsvanrees You are right, jqTree is a different package that has been embeded in Plone, and its new version of insert.py has fixed the issue. so upgrading jqtree in plone should fix the issue, however I am not sure how Plone manages JavaScript installtion or upgrade. one need to fork, change the version in package.json and see if it upgrades to the latest package, or maybe it is afake, and one need to copy the new jqtree and replace the old one.

jqtree is to produce menu in website based on json data.

@sydoluciani
Copy link
Author

@mauritsvanrees jqtree might be moved to Volto some time in future if Volto is going to be the default front end, but until then, these files should be maintained.

Like you said, it is only a syntax error in print statement and probably not worth the upgrade, the upgrade might break some menus in Plone, but it is good to know what is the source of problem. now we know there is a jqtree to produce menu 😄

Thanks for the reply and following up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants