Problem adding ingredient amounts

Help
Cyryl
2005-05-22
2013-05-14
  • Cyryl

    Cyryl - 2005-05-22

    Hi

    I'm using 0.8.4.4-1 debian package. And i'm suffering from a problem with ingredient amounts.
    On a "ingredients" tab its not possible to add
    ingredient with an amount. It's simply dropped both
    in ingredient editor, and on a grid. On console i get a
    "Warning: assuming   is a decimal point in 1".
    "1" is the amount i am trying to set.
    Does anybody knows what is going on?

     
    • tom

      tom - 2005-05-22

      I can't reproduce here. What's your locale?

       
    • Cyryl

      Cyryl - 2005-05-22

      LANG=pl_PL.ISO-8859-2

       
      • Cyryl

        Cyryl - 2005-05-22

        just checked
        LANG=C gourmet
        same warning, but after generating locales for en_GB, and running
        LANG=en_GB gourmet
        i can set amounts. But still after running with pl_PL  locale i can't set them.

         
        • tom

          tom - 2005-05-22

          Okay -- it will be a bug with the number parsing code then.
          If my quick test here was accurate, there is no thousand separator for your locale, which is what is confusing my code (I assumed it must be either "," or "." but not "").

          Could you try changing line 462 of convert.py (in /usr/share/gourmet/ of your debian distribution) from:
             elif s.find(THOUSEP)>-1 and THOUSEP != '.':
          to:
             elif THOUSEP and s.find(THOUSEP)>-1 and THOUSEP != '.':

          I believe this should fix the bug, but I'm not absolutely certain since I don't have the locale here.

          Tom

           
    • Cyryl

      Cyryl - 2005-05-23

      Yes, that fixed the problem. Thank you.

       
      • tom

        tom - 2005-05-23

        Great! The fix will be in the next release.

         
    • de vogon

      de vogon - 2005-06-27

      this is still a problem with (presumably) non-us locale or LANG such as nl_NL. Gourmet-0.5.8.3.

      i also cannot locate any convert.py in this version.

       
    • tom

      tom - 2005-06-30

      Yeah, I just fixed this for 0.8.5.4.  Not sure why the fix never made it into the source code. I ended up reproducing the bug and the fix completely, having forgotten entirely about this thread... oh well.

       
    • Vincent

      Vincent - 2006-05-26

      I have just install your program and I got the same probleme with Gourmet 0.8.5.14 for windows.
      I use windows XP.

      I try the unstable version, but it failed to start...
      Is there anything I can do?

       

Log in to post a comment.