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

'NoneType' object has no attribute 'group' #72

Closed
CogumelosMaravilha opened this issue Apr 15, 2016 · 16 comments
Closed

'NoneType' object has no attribute 'group' #72

CogumelosMaravilha opened this issue Apr 15, 2016 · 16 comments

Comments

@CogumelosMaravilha
Copy link

Hi there,

I'm trying Petrel with wordcount sample but find this problem:
$petrel submit --config topology.yaml --logdir pwd
'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "/home/jonas/.local/lib/python2.7/site-packages/petrel-0.9.4.0.3-py2.7.egg/petrel/cmdline.py", line 111, in main
func(**args.dict)
File "/home/jonas/.local/lib/python2.7/site-packages/petrel-0.9.4.0.3-py2.7.egg/petrel/cmdline.py", line 32, in submit
sourcejar = get_sourcejar()
File "/home/jonas/.local/lib/python2.7/site-packages/petrel-0.9.4.0.3-py2.7.egg/petrel/cmdline.py", line 23, in get_sourcejar
storm_version = get_storm_version()
File "/home/jonas/.local/lib/python2.7/site-packages/petrel-0.9.4.0.3-py2.7.egg/petrel/cmdline.py", line 19, in get_storm_version
return m.group(0)
AttributeError: 'NoneType' object has no attribute 'group'

I also try:
$./buildandrun --config topology.yaml
~/.local/lib/python2.7/site-packages ~/wordcount
Traceback (most recent call last):
File "/home/jonas/Downloads/Petrel-master/petrel/setup.py", line 66, in
build_petrel()
File "/home/jonas/Downloads/Petrel-master/petrel/setup.py", line 29, in build_petrel
version_string, version_number = get_storm_version()
File "/home/jonas/Downloads/Petrel-master/petrel/setup.py", line 21, in get_storm_version
return m.group(0), m.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
Error on or near line 20; exiting with status 1

I'd tried with virtualenv:
$source petrel/bin/activate
and without
$easy_install --install-dir /home/username/.local/lib/python2.7/site-packages petrel==0.9.4.0.3

Thanks in advance

@barrywhart
Copy link
Contributor

What version of Storm are you running? The Storm version should match the first 3 digits of the Petrel version.

@CogumelosMaravilha
Copy link
Author

I'm using 0.10.0. So this is the problem! Is there a 0.10 version or 1.0!?
Thanks in advance.

@topiaruss
Copy link

Are you aware of Streamparse?

—r

On 15 Apr 2016, at 21:39, CogumelosMaravilha notifications@github.com wrote:

I'm using 0.10.0. So this is the problem! Is there a 0.10 version or 1.0!?
Thanks in advance.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub #72 (comment)

Russ Ferriday -- Software Product Architect, Developer, Mentor
Founder & CTO Topia Systems Ltd.
russf@topia.com -- +44 7429 518822

@barrywhart
Copy link
Contributor

There is a PR which is intended to add 0.10 support. It needs to be redone because it has a lot of unnecessary (even incorrect) changes. I will try and work on it some time, or I'd be happy to accept help. :-)

@CogumelosMaravilha
Copy link
Author

CogumelosMaravilha commented Apr 16, 2016

Yes i'm aware of Streamparse. But having a 30k Python code and a 15M jar file, perhaps there must be a better way!

Thanks.

@barrywhart
Copy link
Contributor

I'll work on 0.10 support next week. I think it's just a few hours work at most. In the meantime, can you use Storm 0.9.4?

@CogumelosMaravilha
Copy link
Author

CogumelosMaravilha commented Apr 16, 2016

Hi,

I already downgrade my Apache Strom. Lets see what happens. If i can live with this version!

Thanks a lot for you work Barry.

@barrywhart
Copy link
Contributor

I pushed some fixes to the repo tonight which should make Petrel work with Storm 0.10.0. Can you test and confirm? Note I have not pushed these changes to pypi yet.

@CogumelosMaravilha
Copy link
Author

CogumelosMaravilha commented Apr 19, 2016

Hello Barry,

First off all congrats for your great book.
It's a great book about Petrel, Storm, Python important packages, and cool stuff like MongoDB and Redis, code profiling and debugging. Great examples integration with Twitter, etc.
And better of all the created jar files are so small! And we can debugging Python code inside Strom!
In my honest opinion with better advertisement, like parse.ly does, talking in PyCon, etc. your project become the default highway to integrate Python and Strom.

Be aware in the code chapter 4/twitter_stream.py you forgot to remove your keys!

Now I'm going to test your new version.

Just a thought, why not a pip package!?

Thanks.

@CogumelosMaravilha
Copy link
Author

I have a big problem with my box. Is the motherboard or the CPU.

On 19-04-2016 03:06, Barry Hart wrote:

I pushed some fixes to the repo tonight which should make Petrel work
with Storm 0.10.0. Can you test and confirm? Note I have not pushed
these changes to pypi yet.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#72 (comment)

@barrywhart
Copy link
Contributor

Oops, I should fix those Twitter keys.

I can create a pip package, I was just wondering if you could test it before I upload to pypi (pip). To create a package yourself, all you have to do is "python setup.py sdist".

Thanks for the kind words about the book and Petrel! I should definitely do more marketing. I'm kind of shy, and I'm not using Storm at my current job, so it's kind of been on the back burner. The book was an unplanned project that came about because the publisher already wanted to do a book like that, and they found me.

@CogumelosMaravilha
Copy link
Author

I'm using a new box.
Zookeeper, Kafka and Storm are ok.
After build and pip your package I'm getting:

(petrel) jonas@jonas:/$ petrel
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/jonas/petrel/lib/python2.7/site-packages/petrel/cmdline.py", line 12, in
from .package import build_jar
File "/home/jonas/petrel/local/lib/python2.7/site-packages/petrel/package.py", line 13, in
from topologybuilder import TopologyBuilder
File "/home/jonas/petrel/local/lib/python2.7/site-packages/petrel/topologybuilder.py", line 6, in
from petrel.generated.storm.ttypes import ComponentCommon, Grouping, NullStruct, GlobalStreamId
ImportError: No module named generated.storm.ttypes

But perhaps is something wrong with my new environment!

@barrywhart
Copy link
Contributor

It looks like the step that generates Python wrappers around the Storm Thrift objects failed. I'm not sure why.

I'll push a build to pypi tonight to save us the trouble of diagnosing this.

@barrywhart
Copy link
Contributor

I uploaded version 0.10.0.0.3 to pypi. Give it a try...

@CogumelosMaravilha
Copy link
Author

Looks fine to me!

Thanks a lot.

@barrywhart
Copy link
Contributor

You're welcome!

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

No branches or pull requests

3 participants