amilcarlucas/MethodicConfigurator

View on GitHub
BUGFIX: Do not allow opening recent directory if directory does not exist #35
Dr.-Ing. Amilcar do Carmo Lucas authored e0c52fea
complete00:00:12
Your first build completed successfully!

Congratulations

Your first build completed successfully!

See the Results

1
git clone
2
codeclimate validate-config
View output
codeclimate validate-config
No errors or warnings found in .codeclimate.json.
3
codeclimate prepare
View output
codeclimate prepare
4
builder pull-engines
View output
determining required images
5
structure
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
6
duplication
View output
12
Parser process id: 12
codeclimate-parser socket not present
waiting 1s...
I, [2024-11-01T06:12:18.411998 #1]  INFO -- : Skipping file param_reorder.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 38
    new_key = f"{i:02d}_{old_key.split('_', 1)[1]}"
                                                  ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.412064 #1]  INFO -- : Skipping file copy_magfit_pdef_to_template_dirs.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 21
    print(f"Error: Base target directory {BASE_TARGET_DIR} does not exist.")
                                                                          ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.423527 #1]  INFO -- : Skipping file ./credits/update_credits_licenses.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 54
    filename = f"{package_name}-Mozilla_Public_License_version_2.0.html"
                                                                       ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.424121 #1]  INFO -- : Skipping file setup.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 47
    long_description = long_description.replace("(USERMANUAL.md", f"({PRJ_URL}/blob/master/USERMANUAL.md")
                                                                                                        ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.435053 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_flightcontroller_info.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 31
    def __init__(self, flight_controller: FlightController):
                                        ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.435603 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_template_overview.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 45
    def __init__(self, parent: tk.Tk):
                             ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.446771 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_directory_selection.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 51
    def __init__(self, parent, parent_frame, initialdir: str, label_text: str,  # pylint: disable=too-many-arguments
                                                       ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.446814 #1]  INFO -- : Skipping file ./MethodicConfigurator/tempcal_imu.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 136
    params += f'INS_TCAL{imu+1}_ENABLE 1\n'
                                          ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.457615 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_component_editor_base.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 57
    def __init__(self, version, local_filesystem: LocalFilesystem=None):
                                                ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.458061 #1]  INFO -- : Skipping file ./MethodicConfigurator/battery_cell_voltages.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 68
    def chemistries() -> list:
                      ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.468818 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_mavftp.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 113
    ret = f"OP seq:{self.seq} sess:{self.session} opcode:{self.opcode} req_opcode:{self.req_opcode}" \
                                                                                                   ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.474081 #1]  INFO -- : Skipping file ./MethodicConfigurator/common_arguments.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 22
    version=f'%(prog)s {VERSION}',
                                ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.479815 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_connection_selection.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 99
    def __init__(self, parent, parent_frame, flight_controller: FlightController,  # pylint: disable=too-many-arguments
                                                              ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.485003 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_filesystem_program_settings.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 53
    def create_new_vehicle_dir(new_vehicle_dir: str):
                                              ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.496397 #1]  INFO -- : Skipping file ./MethodicConfigurator/annotate_params.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 85
    parser.add_argument('-v', '--version', action='version', version=f'%(prog)s {VERSION}',
                                                                                         ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.501908 #1]  INFO -- : Skipping file ./MethodicConfigurator/middleware_template_overview.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 20
    def __init__(self, components_data: dict):
                                      ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.508541 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_flightcontroller_info.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 78
    self.flight_sw_version = f"{v_major}.{v_minor}.{v_patch}"
                                                            ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.513191 #1]  INFO -- : Skipping file ./MethodicConfigurator/param_pid_adjustment_update.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 49
    parser.add_argument('-v', '--version', action='version', version=f'%(prog)s {VERSION}',
                                                                                         ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.519744 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_base.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 31
    def show_error_message(title: str, message: str):
                                ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.524584 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_parameter_editor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 57
    def __init__(self, root: tk.Tk, local_filesystem, current_file: str):
                           ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.531352 #1]  INFO -- : Skipping file ./MethodicConfigurator/extract_param_defaults.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 75
    def extract_parameter_values(logfile: str, param_type: str = 'defaults') -> Dict[str, float]:  # pylint: disable=too-many-branches
                                        ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.535909 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_filesystem_vehicle_components.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 40
    def load_vehicle_components_json_data(self, vehicle_dir: str):
                                                           ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.542876 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_flightcontroller.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 70
    def __init__(self, device: str):
                             ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.554335 #1]  INFO -- : Skipping file ./MethodicConfigurator/get_release_stats.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 56
    print(f"{release.title} ({release_date})")
                                            ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.558669 #1]  INFO -- : Skipping file ./MethodicConfigurator/ardupilot_methodic_configurator.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 126
    show_error_message("Fatal error reading parameter files", f"{exp}")
                                                                     ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.565310 #1]  INFO -- : Skipping file ./MethodicConfigurator/argparse_check_range.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 44
    lo = f"[{self.min}"
                      ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.570059 #1]  INFO -- : Skipping file ./MethodicConfigurator/param_ftp.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 119
    print(f"Decoding file of length {len(data)}")
                                               ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.576193 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_parameter_editor_table.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 88
    def repopulate(self, selected_file: str, different_params: dict, fc_parameters: dict, show_only_differences: bool):
                                      ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.580947 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_filesystem_configuration_steps.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 38
    def __init__(self, _vehicle_dir: str, vehicle_type: str):
                                   ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.587268 #1]  INFO -- : Skipping file ./MethodicConfigurator/frontend_tkinter_component_editor.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 65
    def __init__(self, version, local_filesystem: LocalFilesystem=None):
                                                ^
SyntaxError: invalid syntax


I, [2024-11-01T06:12:18.592724 #1]  INFO -- : Skipping file ./MethodicConfigurator/backend_filesystem.py due to exception (CC::Engine::Analyzers::ParserError): `python2 /usr/src/app/lib/cc/engine/analyzers/python/parser.py` exited with code 1:
Traceback (most recent call last):
  File "/usr/src/app/lib/cc/engine/analyzers/python/parser.py", line 51, in <module>
    print(json.dumps(to_json(ast.parse(source))))
  File "/usr/local/python2/lib/python2.7/ast.py", line 37, in parse
    return compile(source, filename, mode, PyCF_ONLY_AST)
  File "<unknown>", line 48
    def is_within_tolerance(x: float, y: float, atol: float = 1e-08, rtol: float = 1e-03) -> bool:
                             ^
SyntaxError: invalid syntax