jncramp / iniparse

Automatically exported from code.google.com/p/iniparse
Other
0 stars 0 forks source link

UnboundLocalError: local variable 'optobj' referenced before assignment #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Thanks for fixing the last issue so quickly... here is the next one I get...

What steps will reproduce the problem?
1. Ubuntu 8.04.2
2. Python 2.5.2
3. iniparse-0.3.0
4. videocache-1.9.tar.gz
5. while installing videocache iniparse errors out...

$ sudo python setup.py install
Traceback (most recent call last):
  File "setup.py", line 395, in <module>
    main(root)
  File "setup.py", line 333, in main
    mainconf =  readMainConfig(readStartupConfig(config_file, root))
  File "/home/dmonty/Download/videocache-1.9/videocache/config.py", line
710, in readStartupConfig
    parser.readfp(confpp_obj)
  File "/usr/lib/python2.5/site-packages/iniparse/compat.py", line 115, in
readfp
    self.data._readfp(fp)
  File "/usr/lib/python2.5/site-packages/iniparse/ini.py", line 584, in _readfp
    optobj._compat_skip_empty_lines.add(cur_option_name)
UnboundLocalError: local variable 'optobj' referenced before assignment

Original issue reported on code.google.com by montgome...@gmail.com on 1 Mar 2009 at 2:46

GoogleCodeExporter commented 8 years ago
I've posted a thread on the videocache forum as well...
http://cachevideos.com/forum/post/unable-install-videocache-attributeerror

Original comment by montgome...@gmail.com on 1 Mar 2009 at 2:55

GoogleCodeExporter commented 8 years ago
From a brief examination of the code, it's not immediately clear to me what 
could be
causing this... so could you send me the INI file that's being parsed?

Original comment by psobe...@gmail.com on 1 Mar 2009 at 6:27

GoogleCodeExporter commented 8 years ago
INI must be somewhere in the install script...

http://cachevideos.com/sites/default/files/pub/videocache/videocache-1.9.tar.gz

Original comment by montgome...@gmail.com on 1 Mar 2009 at 4:47

GoogleCodeExporter commented 8 years ago
Fixed in revision 116.  Can you try again?  You have a great INI file for 
testing -
it has already exposed two bugs.

(BTW, I think the file being parsed in the Yum config file - so it's not in the
install archive, but specific to your computer)

Original comment by psobe...@gmail.com on 1 Mar 2009 at 5:58

GoogleCodeExporter commented 8 years ago
Everything is working now.  Thanks for your help.

Original comment by montgome...@gmail.com on 2 Mar 2009 at 12:13

GoogleCodeExporter commented 8 years ago
I have tested the fixes against iniparse in Fedora, where 0.3.0 broke the 
package
updater is plugins was enabled, current svn head seams to fix the issues.
Thanks

Original comment by tim.lauridsen on 2 Mar 2009 at 12:56