Hello. Can someone tell me how to fix this probelem ?
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-
packages\dateutil\parser.py”, line 158
l.append"(%s=%s" % (attr, 'value`))
^
SyntaxError: unterminated string literal (detected at line 158)
The way you using quotes on the below line is not right.
append"(%s=%s" % (attr, 'value`))
can you tell me the how to fix it?
Please try the below line instead. Does it work, if not what is the error now?
append(“%s=%s” % (attr, ‘value’))
Watching for file changes with StatReloader
Exception in thread django-main-thread:
Traceback (most recent call last):
File “C:\Users\drini\AppData\Local\Programs\Python\Python311\Lib\threading.py”, line 1038, in _bootstrap_inner
self.run()
File “C:\Users\drini\AppData\Local\Programs\Python\Python311\Lib\threading.py”, line 975, in run
self._target(*self.args, **self.kwargs)
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper
fn(*args, **kwargs)
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\core\management\commands\runserver.py”, line 125, in inner_run
autoreload.raise_last_exception()
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\utils\autoreload.py”, line 87, in raise_last_exception
raise exception[1]
File "C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\core\management_init.py", line 394, in execute
autoreload.check_errors(django.setup)()
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\utils\autoreload.py”, line 64, in wrapper
fn(*args, **kwargs)
File "C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django_init.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\apps\registry.py”, line 116, in populate
app_config.import_models()
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\django\apps\config.py”, line 269, in import_models
self.models_module = import_module(models_module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\drini\AppData\Local\Programs\Python\Python311\Lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “”, line 1206, in _gcd_import
File “”, line 1178, in _find_and_load
File “”, line 1149, in _find_and_load_unlocked
File “”, line 690, in _load_unlocked
File “”, line 940, in exec_module
File “”, line 241, in _call_with_frames_removed
File “C:\Users\drini\OneDrive\Desktop\vidly\api\models.py”, line 2, in
from tastypie.resources import ModelResource
from tastypie.utils.formatting import mk_datetime, format_datetime, format_date, format_time # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\tastypie\utils\formatting.py”, line 5, in
from dateutil.parser import parse as mk_datetime # noqa
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “C:\Users\drini.virtualenvs\vidly-vgkdpHIT\Lib\site-packages\dateutil\parser.py”, line 158
l.append"(%s=%s" % (attr, 'value`))
^
SyntaxError: unterminated string literal (detected at line 158)
this error happend when i was using this comannd
python manage.py collectstatic
Are you trying to deploy?
yes i’m trying and when i’m runing python manage.py collectstatic , it is showing this error
“ is in wrong place?
I don’t know , it was there , I didn’t touch
something.append( )
append is a function. You have .append”(