Forums

synax error

Hi I am new to hosting on pythonanywhere,I have been trying to run my code but am getting syntax errors. An example is my password validator setting: AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', }, { 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', }, { 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', }, { 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', }, ] it seems okay but am getting an error in the form: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/bin/pythonanywhere_runner.py", line 26, in _pa_run code = compile(f.read(), filename.encode("utf8"), "exec") File "/home/gashororo/zack/examiner/examiner/settings.py", line 96 AUTH_PASSWORD_VALIDATORS = [ ^ SyntaxError: invalid syntax

Anyone know how to fix it am getting irritated.

I see that you are already in conversation over support email. Let's continue there.

any answer abouthis?? File "/bin/pythonanywhere_runner.py", line 26, in _pa_run code = compile(f.read(), filename.encode("utf8"), "exec")

Look at the rest of the traceback that you received. In @gashororo's case, they have a syntax error that is preventing their code from running.

Were you able to solve this error? I am having the same error.

@nidhisingh0068 could you show the error message you're getting?