Advertisement
Guest User

Untitled

a guest
Sep 28th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.46 KB | None | 0 0
  1. @app.route('/parseinsert')
  2. def run_parse_db_insert():
  3. """The method for testing implementation and design of the Parse Db
  4. """
  5. pc = ParseCommunication()
  6. print(pc.get_all_names_rating_table())
  7. return 'done'
  8.  
  9. /parseTest
  10. /aplication
  11. views.py
  12. app.yaml
  13. run.py
  14.  
  15. import os
  16. import sys
  17. sys.path.insert(1, os.path.join(os.path.abspath('.'), 'lib'))
  18. sys.path.insert(1, os.path.join(os.path.abspath('.'), 'application'))
  19. import aplication
  20.  
  21. ERROR 2016-09-28 06:45:50,271 app.py:1587] Exception on /parseinsert [GET]
  22. Traceback (most recent call last):
  23. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/flask/app.py", line 1988, in wsgi_app
  24. response = self.full_dispatch_request()
  25. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/flask/app.py", line 1641, in full_dispatch_request
  26. rv = self.handle_user_exception(e)
  27. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/flask/app.py", line 1544, in handle_user_exception
  28. reraise(exc_type, exc_value, tb)
  29. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/flask/app.py", line 1639, in full_dispatch_request
  30. rv = self.dispatch_request()
  31. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/flask/app.py", line 1625, in dispatch_request
  32. return self.view_functions[rule.endpoint](**req.view_args)
  33. File "/home/theshade/Devel/ParseBabynames/parseTest/aplication/views.py", line 34, in run_parse_db_insert
  34. name = pc.get_user('testuser1')
  35. File "/home/theshade/Devel/ParseBabynames/parseTest/aplication/parseCommunication.py", line 260, in get_user
  36. return User.Query.get(username=uname)
  37. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/query.py", line 58, in get
  38. return self.filter(**kw).get()
  39. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/query.py", line 150, in get
  40. results = self._fetch()
  41. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/query.py", line 117, in _fetch
  42. return self._manager._fetch(**options)
  43. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/query.py", line 41, in _fetch
  44. return [klass(**it) for it in klass.GET(uri, **kw).get('results')]
  45. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/connection.py", line 108, in GET
  46. return cls.execute(uri, 'GET', **kw)
  47. File "/home/theshade/Devel/ParseBabynames/parseTest/lib/parse_rest/connection.py", line 102, in execute
  48. raise exc(e.read())
  49. ResourceRequestLoginRequired: {"error":"unauthorized"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement