{"action":"opened","issue":{"url":"https://api.github.com/repos/tgalal/yowsup/issues/673","labels_url":"https://api.github.com/repos/tgalal/yowsup/issues/673/labels{/name}","comments_url":"https://api.github.com/repos/tgalal/yowsup/issues/673/comments","events_url":"https://api.github.com/repos/tgalal/yowsup/issues/673/events","html_url":"https://github.com/tgalal/yowsup/issues/673","id":60109781,"number":673,"title":"can't use stack. first app on yowsup2","user":{"login":"rami-dabain","id":1197104,"avatar_url":"https://avatars.githubusercontent.com/u/1197104?v=3","gravatar_id":"","url":"https://api.github.com/users/rami-dabain","html_url":"https://github.com/rami-dabain","followers_url":"https://api.github.com/users/rami-dabain/followers","following_url":"https://api.github.com/users/rami-dabain/following{/other_user}","gists_url":"https://api.github.com/users/rami-dabain/gists{/gist_id}","starred_url":"https://api.github.com/users/rami-dabain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rami-dabain/subscriptions","organizations_url":"https://api.github.com/users/rami-dabain/orgs","repos_url":"https://api.github.com/users/rami-dabain/repos","events_url":"https://api.github.com/users/rami-dabain/events{/privacy}","received_events_url":"https://api.github.com/users/rami-dabain/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T14:41:06Z","updated_at":"2015-03-06T14:41:06Z","closed_at":null,"body":"Traceback (most recent call last):\r\n  File \"node_whatsapp.py\", line 13, in <module>\r\n    from yowsup.stacks import YowStack\r\n  File \"models/yowsup/stacks/__init__.py\", line 20, in <module>\r\n    from yowsup.layers.protocol_profiles           import YowProfilesProtocolLayer\r\n  File \"models/yowsup/layers/protocol_profiles/__init__.py\", line 1, in <module>\r\n    from .layer import YowProfilesProtocolLayer\r\nImportError: No module named layer\r\n\r\n\r\ncode : \r\n\r\n````\r\nimport sys\r\n\r\nsys.path.insert(0, 'models')\r\n\r\nimport yowsup\r\n\r\nfrom yowsup.layers.auth                        import YowAuthenticationProtocolLayer\r\nfrom yowsup.layers.protocol_messages           import YowMessagesProtocolLayer\r\nfrom yowsup.layers.protocol_receipts           import YowReceiptProtocolLayer\r\nfrom yowsup.layers.protocol_acks               import YowAckProtocolLayer\r\nfrom yowsup.layers.network                     import YowNetworkLayer\r\nfrom yowsup.layers.coder                       import YowCoderLayer\r\nfrom yowsup.stacks import YowStack\r\nfrom yowsup.common import YowConstants\r\nfrom yowsup.layers import YowLayerEvent\r\nfrom yowsup.stacks import YowStack, YOWSUP_CORE_LAYERS\r\nfrom yowsup import env\r\n\r\nCREDENTIALS = (\"***\", \"***=\")\r\n\r\n##############################################################\r\nimport argparse, logging\r\n\r\nfrom yowsup.layers.protocol_presence.protocolentities.presence  import PresenceProtocolEntity\r\nfrom yowsup.layers                                              import YowLayer\r\n\r\nclass presenceLayer(YowLayer):\r\n    def send(self, data):\r\n        self.toLower(data)\r\n\r\n    def receive(self, data):\r\n        self.toUpper(data)\r\n\r\n\r\n\r\n\r\n\r\nlayers = (\r\n        (YowAuthenticationProtocolLayer, YowMessagesProtocolLayer, YowReceiptProtocolLayer, YowAckProtocolLayer)\r\n    ) + YOWSUP_CORE_LAYERS\r\n\r\nstack = YowStack(layers)\r\nstack.setProp(YowAuthenticationProtocolLayer.PROP_CREDENTIALS, CREDENTIALS)         #setting credentials\r\nstack.setProp(YowNetworkLayer.PROP_ENDPOINT, YowConstants.ENDPOINTS[0])    #whatsapp server address\r\nstack.setProp(YowCoderLayer.PROP_DOMAIN, YowConstants.DOMAIN)\r\nstack.setProp(YowCoderLayer.PROP_RESOURCE, env.CURRENT_ENV.getResource())          #info about us as WhatsApp client\r\n\r\nstack.broadcastEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECT))   #sending the connect signal\r\n\r\nstack.loop() #this is the program mainloop\r\n\r\n````"}}