Internal Server Error: /demo/machineinfo.html
Traceback (most recent call last):
File “C:\Python27\lib\site-packages\django\core\handlers\exception.py”, line 41, in inner
response = get_response(request)
File “C:\Python27\lib\site-packages\django\core\handlers\base.py”, line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File “C:\Python27\lib\site-packages\django\core\handlers\base.py”, line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “G:\python\project\myApp\machineviews.py”, line 25, in htmlmachineinfo
print machineinfo.objects.filter(serialNumber=machineser)
File “C:\Python27\lib\site-packages\django\db\models\query.py”, line 226, in __repr__
data = list(self[:REPR_OUTPUT_SIZE + 1])
File “C:\Python27\lib\site-packages\django\db\models\query.py”, line 250, in __iter__
self._fetch_all()
File “C:\Python27\lib\site-packages\django\db\models\query.py”, line 1118, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File “C:\Python27\lib\site-packages\django\db\models\query.py”, line 62, in __iter__
for row in compiler.results_iter(results):
File “C:\Python27\lib\site-packages\django\db\models\sql\compiler.py”, line 842, in results_iter
row = self.apply_converters(row, converters)
File “C:\Python27\lib\site-packages\django\db\models\sql\compiler.py”, line 827, in apply_converters
value = converter(value, expression, self.connection, self.query.context)
File “C:\Python27\lib\site-packages\django\db\backends\mysql\operations.py”, line 239, in convert_datetimefield_value
value = timezone.make_aware(value, self.connection.timezone)
File “C:\Python27\lib\site-packages\django\utils\timezone.py”, line 285, in make_aware
return timezone.localize(value, is_dst=is_dst)
File “C:\Python27\lib\site-packages\pytz\__init__.py”, line 222, in localize
if dt.tzinfo is not None:
AttributeError: ‘unicode’ object has no attribute ‘tzinfo’
The temporary solution takes the database
models.DateTimeField(auto_now_add=True)
The relevant time statement is commented out first, and then executed.
I'll update it later when I have a solution.
Similar Posts:
- Django logs detailed error reporting information
- [Solved] Django error: AttributeError: ‘QuerySet’ object has no attribute ‘id’
- AttributeError: ‘NoneType’ object has no attribute ‘split’ [How to Solve]
- [Solved] Djiango Create Migrations Error: query = query.decode(errors=’replace’) AttributeError: ‘str’ object has no attribute ‘decode’
- ImportError: No module named pytz
- Django Run Error: RuntimeError: maximum recursion depth exceeded while calling a Python object
- Strange frame error caused by incorrect use of flash. Redirect (‘/ path’) in flash
- django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named ‘M…
- TypeError: ‘unicode’ object is not callable
- TypeError: ‘unicode’ object is not callable