ComicTagger Talk
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[FIXED] DeprecationWarning

2 posters

Go down

[FIXED] DeprecationWarning Empty [FIXED] DeprecationWarning

Post  anomander Fri Apr 05, 2013 4:48 am

Setting up a dedicated virtual machine for CT. Using debian 6.0.6, SVN checkout of CT etc.

I see this warning on every conversion. It is trivial if a tad annoying:

Code:

# python /home/user/svn/comictagger/comictagger.py -e ./*****.cbr
/home/user/svn/comictagger/comictaggerlib/settings.py:163: DeprecationWarning: This method will be removed in future versions.  Use 'parser.read_file()' instead.
  self.config.readfp(codecs.open(self.settings_file, "r", "utf8"))
Archive exported successfully to: *****.cbz

Can we silence or remove this issue?


Last edited by anomander on Sat Apr 06, 2013 2:46 am; edited 1 time in total
anomander
anomander

Posts : 74
Join date : 2013-03-28

Back to top Go down

[FIXED] DeprecationWarning Empty Re: [FIXED] DeprecationWarning

Post  ComicTagger Fri Apr 05, 2013 4:18 pm

Hmm, I wonder why you're getting that? I seem to have the latest version "configparser" and I don't ever see that. Just curious, what version of Python are you running?

At any rate, the next release should fix this. As I can't test it, I would appreciate it if you you do this:

In settings.py, in the function "load()", can you replace the line :

Code:
      self.config.readfp(codecs.open(self.settings_file, "r", "utf8"))
with:
Code:
      def readline_generator(f):
         line = f.readline()
         while line:
            yield line
            line = f.readline()         

      self.config.read_file(readline_generator(codecs.open(self.settings_file, "r", "utf8")))

This should remove the warning.
ComicTagger
ComicTagger
Admin

Posts : 209
Join date : 2012-12-02

https://comictagger.forumotion.com

Back to top Go down

[FIXED] DeprecationWarning Empty Re: [FIXED] DeprecationWarning

Post  anomander Sat Apr 06, 2013 2:45 am

I am running from svn so as soon as you checked it in i could svn up.

Updated to revision 583 and the issue has gone away.

For reference:

root@host:~# uname -a
Linux host2.6.32-5-amd64 #1 SMP Mon Feb 25 00:26:11 UTC 2013 x86_64 GNU/Linux
root@host:~# cat /etc/debian_version
6.0.7
root@host:~# python -V
Python 2.6.6


Nice work that man.
anomander
anomander

Posts : 74
Join date : 2013-03-28

Back to top Go down

[FIXED] DeprecationWarning Empty Re: [FIXED] DeprecationWarning

Post  ComicTagger Sat Apr 06, 2013 3:24 pm

Glad it worked. I don't generally recommend updating and running from SVN, though. You might find things broken or acting weird.
ComicTagger
ComicTagger
Admin

Posts : 209
Join date : 2012-12-02

https://comictagger.forumotion.com

Back to top Go down

[FIXED] DeprecationWarning Empty Re: [FIXED] DeprecationWarning

Post  anomander Sat Apr 06, 2013 3:36 pm

Agreed but thats the beauty of being able to roll back as well.

generally I dont either but i thought i could help test some stuff when needed and its the easiest way
anomander
anomander

Posts : 74
Join date : 2013-03-28

Back to top Go down

[FIXED] DeprecationWarning Empty Re: [FIXED] DeprecationWarning

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum