Skip to content

Instantly share code, notes, and snippets.

@abc873693
Last active February 26, 2019 05:38
Show Gist options
  • Save abc873693/f84e4205b3943e6405d27a8dc9499162 to your computer and use it in GitHub Desktop.
Save abc873693/f84e4205b3943e6405d27a8dc9499162 to your computer and use it in GitHub Desktop.
AttributeError: 'NoneType' object has no attribute 'xpath'
192.168.96.3 - - [26/Feb/2019:05:35:15 +0000] "GET /latest/ap/semester HTTP/1.1" 500 0 "-" "-"
192.168.96.3 - 1104102146 [26/Feb/2019:05:35:16 +0000] "GET /latest/token HTTP/1.1" 200 280 "-" "Dart/2.1 (dart:io)"
2019-02-26 05:35:16,448 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2019-02-26 05:35:16,450 INFO sqlalchemy.engine.base.Engine SELECT news.id AS news_id, news.title AS news_title, news.content AS news_content, news.link AS news_link, news.image AS news_image, news.weight AS
news_weight
FROM news
2019-02-26 05:35:16,450 INFO sqlalchemy.engine.base.Engine ()
2019-02-26 05:35:16,452 INFO sqlalchemy.engine.base.Engine ROLLBACK
192.168.96.3 - 1104102146 [26/Feb/2019:05:35:16 +0000] "GET /latest/news/all HTTP/1.1" 200 484 "-" "Dart/2.1 (dart:io)"
[2019-02-26 05:35:17 +0000] [31729] [ERROR] Error handling request /latest/ap/semester
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
self.handle_request(listener, req, client, addr)
File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1997, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1985, in wsgi_app
response = self.handle_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1540, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/src/app/src/kuas_api/views/v2/ap.py", line 718, in ap_semester
semester_list = ap.get_semester_list()
File "/usr/src/app/src/kuas_api/kuas/ap.py", line 116, in get_semester_list
options = root.xpath("id('yms_yms')/option")
AttributeError: 'NoneType' object has no attribute 'xpath'
192.168.96.3 - - [26/Feb/2019:05:35:17 +0000] "GET /latest/ap/semester HTTP/1.1" 500 0 "-" "-"
192.168.96.3 - 1103105356 [26/Feb/2019:05:35:20 +0000] "GET /latest/token HTTP/1.1" 200 278 "-" "Dart/2.1 (dart:io)"
2019-02-26 05:35:20,494 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
2019-02-26 05:35:20,496 INFO sqlalchemy.engine.base.Engine SELECT news.id AS news_id, news.title AS news_title, news.content AS news_content, news.link AS news_link, news.image AS news_image, news.weight AS
news_weight
FROM news
2019-02-26 05:35:20,497 INFO sqlalchemy.engine.base.Engine ()
2019-02-26 05:35:20,499 INFO sqlalchemy.engine.base.Engine ROLLBACK
192.168.96.3 - 1103105356 [26/Feb/2019:05:35:20 +0000] "GET /latest/news/all HTTP/1.1" 200 484 "-" "Dart/2.1 (dart:io)"
192.168.96.3 - 1104102260 [26/Feb/2019:05:35:22 +0000] "GET /latest/token HTTP/1.1" 200 279 "-" "Dart/2.1 (dart:io)"
2019-02-26 05:35:22,335 INFO sqlalchemy.engine.base.Engine BEGIN (implicit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment