Python + Newspipe

K

kael

Hello,

I'm trying to run _Newspipe_ but Python returns an error :

-----------------------------------------------------------------------
[root@kael root]# python2.3 /home/kael/newspipe/newspipe.py
newspipe.py - version 1.1.1 revision 1.42, Copyright (C) 2003-2004
Ricardo M. Reyes <[email protected]>

Traceback (most recent call last):
File "/home/kael/newspipe/newspipe.py", line 1484, in ?
MainLoop()
File "/home/kael/newspipe/newspipe.py", line 1323, in MainLoop
config = LeerConfig()
File "/home/kael/newspipe/newspipe.py", line 895, in LeerConfig
for attr in ini.options('NewsPipe'):
File "/usr/local/lib/python2.3/ConfigParser.py", line 240, in options
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'NewsPipe'
-----------------------------------------------------------------------

Unfortunately, I'm new to Linux (RedHat9) and to Python (2.3) and I'm
not able to understand this error message.

Could someone enlighten me ? O:)

Thank you very much.
 
D

Dave Kuhlman

kael said:
Hello,

I'm trying to run _Newspipe_ but Python returns an error :

-----------------------------------------------------------------------
[root@kael root]# python2.3 /home/kael/newspipe/newspipe.py
newspipe.py - version 1.1.1 revision 1.42, Copyright (C) 2003-2004
Ricardo M. Reyes <[email protected]>

Traceback (most recent call last):
File "/home/kael/newspipe/newspipe.py", line 1484, in ?
MainLoop()
File "/home/kael/newspipe/newspipe.py", line 1323, in MainLoop
config = LeerConfig()
File "/home/kael/newspipe/newspipe.py", line 895, in LeerConfig
for attr in ini.options('NewsPipe'):
File "/usr/local/lib/python2.3/ConfigParser.py", line 240, in
options
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'NewsPipe'
-----------------------------------------------------------------------

Unfortunately, I'm new to Linux (RedHat9) and to Python (2.3) and
I'm not able to understand this error message.

Could someone enlighten me ? O:)

1. Read about ConfigParser here:

http://docs.python.org/lib/module-ConfigParser.html

2. Read the traceback from the bottom up: (1) The exception is
raised in ConfigParser.py on line 240 in function/method options.
(2) This was called from newspipe.py on line 895 in
function/method LeerConfig.

3. It's looking for a section named "NewsPipe" in your
options/config file. Check your config file. Is that
section name misspelled? Is the section missing? Does
the NewsPipe documentation tell you where the config file
should be and what it's name is? If not, look in newspipe.py.

Hope this helps.

Dave
 
K

kael

Dave said:

Thank you very for this link.
2. Read the traceback from the bottom up: (1) The exception is
raised in ConfigParser.py on line 240 in function/method options.
(2) This was called from newspipe.py on line 895 in
function/method LeerConfig.

Should the changes be made in the newspipe/* directory only ? Or should
I manage the ConfigParser.py ?
3. It's looking for a section named "NewsPipe" in your
options/config file. Check your config file. Is that
section name misspelled? Is the section missing? Does
the NewsPipe documentation tell you where the config file
should be and what it's name is? If not, look in newspipe.py.

According to the Newspipe documentation
http://newspipe.sourceforge.net/#configuration, only the 'smtp_server'
and 'opml' lines are absolutely needed in newspipe.py.

Please, see newspipe.py below:
----------------------------------
[NewsPipe]
log_console=1
smtp_server=smtp.free.fr
opml=test.opml
sleep_time=30
check_online=http://www.google.com
----------------------------------

Do you think any lines are missing ?

Unless, it could come from the OPML file ?
Hope this helps.

Yes. But, unfortunately, not enough - it's hard to be a newbie. :-/

I thank you very much for your help.
 
P

Peter Hansen

kael said:
Dave said:
3. It's looking for a section named "NewsPipe" in your
options/config file. Check your config file. Is that
section name misspelled? Is the section missing? Does
the NewsPipe documentation tell you where the config file
should be and what it's name is? If not, look in newspipe.py.

According to the Newspipe documentation
http://newspipe.sourceforge.net/#configuration, only the 'smtp_server'
and 'opml' lines are absolutely needed in newspipe.py.

Please, see newspipe.py below:
----------------------------------
[NewsPipe]
log_console=1
smtp_server=smtp.free.fr
opml=test.opml
sleep_time=30
check_online=http://www.google.com
----------------------------------

You are misreading something. On the page you referenced above,
it clearly states in "Installation" that the file in question
is named "newspipe.ini", not "newspipe.py". You are confusing
the two, since what you show above is not "newspipe.py" or,
if it is, somebody has messed up...

newspipe.py should contain Python code, newspipe.ini should
contain configuration info like you show above.

If you *have* a newspipe.ini file that contains the above,
but are still getting the error message you reported earlier,
then the program is not *finding* your newspipe.ini file and
you should probably contact the author(s) for assistance,
since this is not a Python issue.

-Peter
 
K

kael

Peter said:
kael wrote
Dave said:
3. It's looking for a section named "NewsPipe" in your
options/config file. Check your config file. Is that
section name misspelled? Is the section missing? Does
the NewsPipe documentation tell you where the config file
should be and what it's name is? If not, look in newspipe.py.
According to the Newspipe documentation
http://newspipe.sourceforge.net/#configuration, only the 'smtp_server'
and 'opml' lines are absolutely needed in newspipe.py.

Please, see newspipe.py below:
----------------------------------
[NewsPipe]
log_console=1
smtp_server=smtp.free.fr
opml=test.opml
sleep_time=30
check_online=http://www.google.com
----------------------------------
You are misreading something. On the page you referenced above,
it clearly states in "Installation" that the file in question
is named "newspipe.ini", not "newspipe.py". You are confusing
the two, since what you show above is not "newspipe.py" or,
if it is, somebody has messed up...

Sorry. The lines above are from *newspipe.ini* not newspipe.py. Thanks
for pointing the confusion.
newspipe.py should contain Python code, newspipe.ini should
contain configuration info like you show above.

If you *have* a newspipe.ini file that contains the above,
but are still getting the error message you reported earlier,
then the program is not *finding* your newspipe.ini file and
you should probably contact the author(s) for assistance,
since this is not a Python issue.

I'm going to contact him. Thank you very much for your reply.

Cheers.
 
K

kael

Peter said:
you should probably contact the author(s) for assistance since this is not a Python issue.

I contact the author and there is a bug in the version I'm using.

Now it works by running

$ cd /newspipe
$ python ./newspipe.py

Instead of

$ python /newspipe/newspipe.py

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top