Error: Failed to find anything that looks like a service in module

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

*add object solve the problem:*

*class HelloWorldService(object):

···

*

On Monday, November 14, 2016 at 12:00:14 PM UTC-8, Lin Wang, PHD wrote:

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

Ahh. This is because the examples assume Python 3.

···

On Tuesday, November 15, 2016 at 1:34:03 AM UTC, Lin Wang, PHD wrote:

*add object solve the problem:*

*class HelloWorldService(object):
*

On Monday, November 14, 2016 at 12:00:14 PM UTC-8, Lin Wang, PHD wrote:

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

This is making me reconsider that decision

Maybe we should keep py3 on the snippet but make examples py2 compatible?
(including future unicode_literals)

···

On Tuesday, 15 November 2016 09:56:11 UTC, Matt Yule-Bennett wrote:

Ahh. This is because the examples assume Python 3.

On Tuesday, November 15, 2016 at 1:34:03 AM UTC, Lin Wang, PHD wrote:

*add object solve the problem:*

*class HelloWorldService(object):
*

On Monday, November 14, 2016 at 12:00:14 PM UTC-8, Lin Wang, PHD wrote:

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

+1 for either backwards compatible examples or explicitly calling out where
examples expect a python 3 environment

···

On 15 November 2016 at 10:03, David Szotten <davidszotten@gmail.com> wrote:

This is making me reconsider that decision

Maybe we should keep py3 on the snippet but make examples py2 compatible?
(including future unicode_literals)

On Tuesday, 15 November 2016 09:56:11 UTC, Matt Yule-Bennett wrote:

Ahh. This is because the examples assume Python 3.

On Tuesday, November 15, 2016 at 1:34:03 AM UTC, Lin Wang, PHD wrote:

*add object solve the problem:*

*class HelloWorldService(object):
*

On Monday, November 14, 2016 at 12:00:14 PM UTC-8, Lin Wang, PHD wrote:

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

--

You received this message because you are subscribed to the Google Groups
"nameko-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to nameko-dev+unsubscribe@googlegroups.com.
To post to this group, send email to nameko-dev@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/
msgid/nameko-dev/e264b574-596e-4260-895f-e508705fe5e3%40googlegroups.com
<https://groups.google.com/d/msgid/nameko-dev/e264b574-596e-4260-895f-e508705fe5e3%40googlegroups.com?utm_medium=email&utm_source=footer&gt;
.

For more options, visit https://groups.google.com/d/optout\.

Pull requests welcome Fergus :wink:

You might just have to revert some of this:

I dislike the idea of importing unicode literals if we can avoid it --
scattering a few "u"'s around is my preference.

···

On 15 November 2016 at 10:40, Fergus Doyle <junkafarian@gmail.com> wrote:

+1 for either backwards compatible examples or explicitly calling out
where examples expect a python 3 environment

On 15 November 2016 at 10:03, David Szotten <davidszotten@gmail.com> > wrote:

This is making me reconsider that decision

Maybe we should keep py3 on the snippet but make examples py2 compatible?
(including future unicode_literals)

On Tuesday, 15 November 2016 09:56:11 UTC, Matt Yule-Bennett wrote:

Ahh. This is because the examples assume Python 3.

On Tuesday, November 15, 2016 at 1:34:03 AM UTC, Lin Wang, PHD wrote:

*add object solve the problem:*

*class HelloWorldService(object):
*

On Monday, November 14, 2016 at 12:00:14 PM UTC-8, Lin Wang, PHD wrote:

I tried the following example both in Linux and Mac OS. Got the error as list in Title.

# helloworld.py
from nameko.rpc import rpc
class GreetingService:
    name = "greeting_service"

    @rpc
    def hello(self, name):
        return "Hello, {}!".format(name)

What I did just:

$ virtualenv service_env
$ source service_env/bin/activate

(service_env)$ pip install nameko

(service_env)$ nameko run helloworld

--

You received this message because you are subscribed to the Google Groups
"nameko-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to nameko-dev+unsubscribe@googlegroups.com.
To post to this group, send email to nameko-dev@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/ms
gid/nameko-dev/e264b574-596e-4260-895f-e508705fe5e3%40googlegroups.com
<https://groups.google.com/d/msgid/nameko-dev/e264b574-596e-4260-895f-e508705fe5e3%40googlegroups.com?utm_medium=email&utm_source=footer&gt;
.

For more options, visit https://groups.google.com/d/optout\.

--
You received this message because you are subscribed to the Google Groups
"nameko-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to nameko-dev+unsubscribe@googlegroups.com.
To post to this group, send email to nameko-dev@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/
msgid/nameko-dev/CA%2BZg9_deW-m%2BU1Qi%3Dd4%2BxODTVBVA5CrFAaW9tMzGrWD6YPDQ
%3DA%40mail.gmail.com
<https://groups.google.com/d/msgid/nameko-dev/CA%2BZg9_deW-m%2BU1Qi%3Dd4%2BxODTVBVA5CrFAaW9tMzGrWD6YPDQ%3DA%40mail.gmail.com?utm_medium=email&utm_source=footer&gt;
.

For more options, visit https://groups.google.com/d/optout\.