This is more a note for myself. When using forward, a SSH tunnel Ruby gem from the folks at forwardhq.com, Google App Engine\Python devserver will barf trying to resolve the Host header when dispatching tasks on the task queue. In my case, my tunnel hostname was coming through in the Host header, causing the KeyError in _port_registry.get(port)
invocation.
dispatcher.py
def _resolve_target(self, hostname, path): if self._port == 80: default_address = self.host else: default_address = '%s:%s' % (self.host, self._port) if not hostname or hostname == default_address: return self._module_for_request(path), None default_address_offset = hostname.find(default_address) if default_address_offset > 0: prefix = hostname[:default_address_offset - 1] # The prefix should be 'module', but might be 'instance.version.module', # 'version.module', or 'instance.module'. These alternatives work in # production, but devappserver2 doesn't support running multiple versions # of the same module. All we can really do is route to the default # version of the specified module. if '.' in prefix: logging.warning('Ignoring instance/version in %s; multiple versions ' 'are not supported in devappserver.', prefix) module_name = prefix.split('.')[-1] return self._get_module_with_soft_routing(module_name, None), None else: if ':' in hostname: port = int(hostname.split(':', 1)[1]) else: port = 80 try: _module, inst = self._port_registry.get(port) except KeyError: raise request_info.ModuleDoesNotExistError(hostname) _module, inst = None, None if not _module: _module = self._module_for_request(path) return _module, inst
The line in red is the line that is barfing. Comment out the raise error line and set _module and inst to None, allowing execution to continue and the next line will test if _module hasn't been set and will go ahead and resolve it. Found the temporary fix from https://github.com/dylanvee/homebrew-gae_sdk. Hopefully this is something the GAE people can fix in upcoming versions of GAE\Python SDK.
Great and Useful Article.
ReplyDeleteJava Online Course
Java Online Training
Java EE training
Java Course in Chennai
Java Training in Chennai
Java Training Institutes in Chennai
Java Interview Questions
Java Interview Questions
This helped me, Thanks
ReplyDeleteWays to clean houses in Riyadh in record time*Ways of moving furniture in Riyadh*A steam cleaning company in Jeddah*An insect control company in Riyadh*Landscaping in Riyadh*Landscaping Company in Riyadh*Pest Control in Riyadh*Transportation of furniture in Medina
ReplyDelete
ReplyDeletemlb중계
ckjeo iree
토토사이트
ReplyDeleteckekj coieee
ReplyDelete먹튀검증
ckejr oioxere
ReplyDelete메이저놀이터
ckejrkeerer
ReplyDelete온라인카지노
ckjek ociewe
스탁론
ReplyDeleteckje oeiroere
This page contains a list of The Sims 4 cheats, Easter eggs, tips, and other secrets. The following list of Sims 4 cheats are designed specifically for PC.
ReplyDeletethank you for sharing Informative blog
ReplyDeleteBest Astrologer In Bangalore
Very best blog thanks for sharing..
ReplyDeleteVisit Best Astrologer in Peddapalli
Great post,Thank you.
ReplyDeletevisit here
Sofa Refurbishing in Doddakallasandra
Great Blog.
ReplyDeleteFor rat control services in bangalore. Contact us.
Thanks for the greatfull post.
ReplyDeleteVisit resorts in bangalore.
Thanks for sharing this information and keep posting.
ReplyDeleteVisit Best Astrologer in RT Nagar.
Nice information. Good Post.
ReplyDeleteVisit Best indian Astrologer in Red deer.