title: Converting string into decimal result in decimal.InvalidOperation
body: <p>I receive some input from an external device (serial) and I'm trying to parse the values into decimals. But <strong>only</strong> on my <strong>raspberry pi in docker</strong> I receive <strong>sometimes</strong> the following error:</p>
  <blockquote>
  <p>File &quot;/usr/bin/asmp/worker/parser.py&quot;, line 58, in parse_line_value</p>
  <blockquote>
  <p>return Decimal(value_node)</p>
  </blockquote>
  <p>decimal.InvalidOperation: [&lt;class 'decimal.ConversionSyntax'&gt;]</p>
  </blockquote>
  <p>The exception occurs in the follow function (first return statement):</p>
  <pre><code> def parse_line_value(self, key, value_node):
      &quot;&quot;&quot;Interprets the value of the line&quot;&quot;&quot;
      value_node = value_node.replace(&quot;*kWh&quot;, &quot;&quot;).replace(&quot;*kW&quot;, &quot;&quot;)
      print(&quot;Parsing value (&quot;+key+&quot;):'&quot;+value_node+&quot;'&quot;)
  
      if key is not None and (&quot;usage_&quot; in key or &quot;return_&quot; in key):
          return Decimal(value_node)
  
      return value_node
  </code></pre>
  <p>The input which causes the crash is the following</p>
  <pre><code>key = return_total_normal
  value = 000000.000*kWh
  </code></pre>
  <p>As you can see I put a print statement in the function just before converting the string into a decimal, the last few lines before the crash are:</p>
  <pre><code>Parsing value (usage_total_low):'000333.744'
  Parsing value (return_total_low):'000000.000'
  Parsing value (return_total_normal):'000000.000'
  </code></pre>
  <p>So as you can see the value for return_total_low is exactly the same as return_total_normal but that works just fine. Also this sometimes occurs, so in other occasions I have no error and it functions for 10 days in a row. (parsing that value every 10 seconds)</p>
  <p>Any clue which can put me on the right track?</p>