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

ValueError: invalid literal for int() with base 10: '141-252' #3

Closed
switchtower opened this issue Apr 18, 2013 · 3 comments
Closed

Comments

@switchtower
Copy link

CentOS 6.4
Python 2.6.6

It seems that what ever I try, I get the following error.

In [4]: d=pynfdump.nfdump.Dumper()

ValueError Traceback (most recent call last)
in ()
----> 1 d=pynfdump.nfdump.Dumper()

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc in init(self, datadir, profile, sources, remote_host)
119 self.remote_host = remote_host
120 self.set_where()
--> 121 self.protocols = load_protocols()
122
123 def set_where(self, start=None, end=None, filename=None,dirfiles=None, stdin=False):

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc in load_protocols()
31 if not line.strip(): break
32 proto, num,_ = line.split(None,2)
---> 33 protocols[int(num)] = proto
34 protocols[0]='ip'
35 f.close()

ValueError: invalid literal for int() with base 10: '141-252'

In [5]:

@JustinAzoff
Copy link
Owner

Ah.. That's in the code that parses /etc/protocols. Your protocols file
seems to have a range defined in it which I am not expecting.

I need to see if that code is still needed or if newer versions of python
have a function in the socket module to lookup a protocol by number. I can
fix this up in the next day or so.
On Apr 18, 2013 4:36 PM, "switchtower" notifications@github.com wrote:

CentOS 6.4
Python 2.6.6

It seems that what ever I try, I get the following error.
In [4]: d=pynfdump.nfdump.Dumper()

ValueError Traceback (most recent call last)
in ()
----> 1 d=pynfdump.nfdump.Dumper()

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc
in init(self, datadir, profile, sources, remote_host)
119 self.remote_host = remote_host
120 self.set_where()
--> 121 self.protocols = load_protocols()
122
123 def set_where(self, start=None, end=None, filename=None,dirfiles=None,
stdin=False):

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc
in load_protocols()
31 if not line.strip(): break
32 proto, num,_ = line.split(None,2)
---> 33 protocols[int(num)] = proto
34 protocols[0]='ip'
35 f.close()

ValueError: invalid literal for int() with base 10: '141-252'

In [5]:


Reply to this email directly or view it on GitHubhttps://github.com//issues/3
.

@switchtower
Copy link
Author

Hey Justin,

Thanks for getting back to me so quickly. If you would like me to send the /etc/protocols file to you, let me know. This is a default Cent install with very few changes. Just messing around with our flow data where I work. :)

--Nick

----- Original Message -----

From: "Justin" notifications@github.com
To: "JustinAzoff/pynfdump" pynfdump@noreply.github.com
Cc: "switchtower" nick@switchtower.org
Sent: Thursday, April 18, 2013 5:48:12 PM
Subject: Re: [pynfdump] ValueError: invalid literal for int() with base 10: '141-252' (#3)

Ah.. That's in the code that parses /etc/protocols. Your protocols file
seems to have a range defined in it which I am not expecting.

I need to see if that code is still needed or if newer versions of python
have a function in the socket module to lookup a protocol by number. I can
fix this up in the next day or so.
On Apr 18, 2013 4:36 PM, "switchtower" notifications@github.com wrote:

CentOS 6.4
Python 2.6.6

It seems that what ever I try, I get the following error.
In [4]: d=pynfdump.nfdump.Dumper()

ValueError Traceback (most recent call last)
in ()
----> 1 d=pynfdump.nfdump.Dumper()

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc
in init(self, datadir, profile, sources, remote_host)
119 self.remote_host = remote_host
120 self.set_where()
--> 121 self.protocols = load_protocols()
122
123 def set_where(self, start=None, end=None, filename=None,dirfiles=None,
stdin=False):

/usr/lib/python2.6/site-packages/pynfdump-0.4.0dev-py2.6.egg/pynfdump/nfdump.pyc
in load_protocols()
31 if not line.strip(): break
32 proto, num,_ = line.split(None,2)
---> 33 protocols[int(num)] = proto
34 protocols[0]='ip'
35 f.close()

ValueError: invalid literal for int() with base 10: '141-252'

In [5]:


Reply to this email directly or view it on GitHubhttps://github.com//issues/3
.


Reply to this email directly or view it on GitHub .

@JustinAzoff
Copy link
Owner

Ah, It is from a comment:

# 141-252 Unassigned [IANA]

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

2 participants