Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError in utils.py line 83 #10

Closed
josebet1 opened this issue Oct 9, 2016 · 3 comments
Closed

TypeError in utils.py line 83 #10

josebet1 opened this issue Oct 9, 2016 · 3 comments
Assignees
Labels

Comments

@josebet1
Copy link
Collaborator

josebet1 commented Oct 9, 2016

@jreinstra Fix, so we can move on.
cc: @jasonscharff

root@ubuntu:~/mhacks8# python app.py
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, _self.__kwargs)
File "/root/mhacks8/utils.py", line 83, in generate_sketch_dict
for i in xrange(0, len(routes_dict['routes'])):
TypeError: 'Response' object has no attribute '__getitem
'

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, _self.__kwargs)
File "/root/mhacks8/utils.py", line 83, in generate_sketch_dict
for i in xrange(0, len(routes_dict['routes'])):
TypeError: 'Response' object has no attribute '__getitem
'

Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in *bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, _self.__kwargs)
File "/root/mhacks8/utils.py", line 83, in generate_sketch_dict
for i in xrange(0, len(routes_dict['routes'])):
TypeError: 'Response' object has no attribute '__getitem
'

@josebet1
Copy link
Collaborator Author

josebet1 commented Oct 9, 2016

It broke because of #9, seems like unit/ui tests are missing (?!?!?)

@jasonscharff
Copy link
Collaborator

@josebet1 I'll be damned when you invent server side UI testing.

@josebet1
Copy link
Collaborator Author

josebet1 commented Oct 9, 2016

@jreinstra You killed the server.

Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, *_self.__kwargs)
File "/root/mhacks8/utils.py", line 90, in generate_sketch_dict
sketch_dict
File "/root/mhacks8/utils.py", line 110, in calc_sketchiness
nearby_crimes_score(sketch_dict, lat, lon)
File "/root/mhacks8/utils.py", line 127, in nearby_crimes_score
for doc in cursor:
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 1090, in next
if len(self.__data) or self._refresh():
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 1032, in _refresh
self.__max_await_time_ms))
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 850, in __send_message
*_kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 844, in _send_message_with_response
exhaust)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 855, in _reset_on_error
return func(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/server.py", line 131, in send_message_with_response
response_data = sock_info.receive_message(1, request_id)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 272, in receive_message
self._raise_connection_failure(error)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 372, in _raise_connection_failure
raise error
LoopExit: ('This operation would block forever', <Hub at 0x7f0a6d21c910 epoll pending=0 ref=0 fileno=20 resolver=<gevent.resolver_thread.Resolver at 0x7f0a6c2db6d0 pool=<ThreadPool at 0x7f0a6c2db710 0/1/10>> threadpool=<ThreadPool at 0x7f0a6c2db710 0/1/10>>)

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(_self.__args, *_self.__kwargs)
File "/root/mhacks8/utils.py", line 90, in generate_sketch_dict
sketch_dict
File "/root/mhacks8/utils.py", line 110, in calc_sketchiness
nearby_crimes_score(sketch_dict, lat, lon)
File "/root/mhacks8/utils.py", line 127, in nearby_crimes_score
for doc in cursor:
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 1090, in next
if len(self.__data) or self._refresh():
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 1032, in _refresh
self.__max_await_time_ms))
File "/usr/local/lib/python2.7/dist-packages/pymongo/cursor.py", line 850, in __send_message
*_kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 844, in _send_message_with_response
exhaust)
File "/usr/local/lib/python2.7/dist-packages/pymongo/mongo_client.py", line 855, in _reset_on_error
return func(_args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pymongo/server.py", line 131, in send_message_with_response
response_data = sock_info.receive_message(1, request_id)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 272, in receive_message
self._raise_connection_failure(error)
File "/usr/local/lib/python2.7/dist-packages/pymongo/pool.py", line 372, in _raise_connection_failure
raise error
LoopExit: ('This operation would block forever', <Hub at 0x7f0a6d21cb90 epoll pending=0 ref=0 fileno=27 resolver=<gevent.resolver_thread.Resolver at 0x7f0a6c2db650 pool=<ThreadPool at 0x7f0a6c2eb0d0 0/1/10>> threadpool=<ThreadPool at 0x7f0a6c2eb0d0 0/1/10>>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants