The syntax error in line 6 is related to the use of parentheses. In Python, parentheses are used to define tuples and to enclose function arguments. However, in this case, it seems that the error is caused by the script being run in the wrong shell or interpreter.

If you are trying to run this script directly from the command line, make sure that you are using the correct Python interpreter. You can check the correct interpreter by running python --version or python3 --version in your terminal.

If you are running the script within a Python interpreter, you should remove the ./ from the beginning of the filename and run it using the execfile() function. For example:

execfile('back.py')

Remember to replace 'back.py' with the correct path to your script if it is in a different directory.

Alternatively, you can run the script directly by changing its permissions using chmod +x back.py and then executing it with ./back.py. But make sure that the script starts with a shebang line (e.g., #!/usr/bin/env python) to specify the interpreter

backpy line 6 syntax error near unexpected token backpy line 6 current_date = datetimedatetimenowstrftimeYmd

原文地址: https://www.cveoy.top/t/topic/iMQ1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录