<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ValueError: could not convert string to float]]></title><description><![CDATA[<p dir="auto">Hello everyone, hope you are all well :). First i search in my database, i change the tuple into a list then i want change a list of string to a list of foat so i can manipulate the value.</p>
<p dir="auto">I make the type in database in string i dont know if i have to change it, tell me ?</p>
<p dir="auto">I dont know what is wrong, thanks in advance</p>
<p dir="auto">the lists :</p>
<pre><code>[('78,38',), ('100,40745',), ('90,75',), ('110,32',), ('89,6',)]
['78,38', '100,40745', '90,75', '110,32', '89,6']
</code></pre>
<p dir="auto">the error :</p>
<pre><code>ValueError: could not convert string to float: '78,38'
</code></pre>
<pre><code>            searchrol = "Isolation Thermique par l'Extérieur"
            cursor = db.cursor()
            result_5 = cursor.execute("SELECT prix FROM PU WHERE desig_pu= ?  ", (str(searchrol),))
            row_5 = result_5.fetchall()
            print(row_5)
            liste = []
            my_list = [] 
            for tupl in row_5: # initialisation de liste
                for i in tupl: 
                    liste.append(i)  
            print (liste) # afficher la liste
            my_list = [float(i) for i in liste]
            #my_list = list(map(float, liste))
            #print(type(liste[0]))
            print (my_list)
            BT = 113.2
            BT0 = 113.4
            row_actualise = []
            for x in liste:
                y = x*(BT/BT0)
                row_actualise.append(str(y))
            print(row_actualise)
![Capture.PNG](https://ddgobkiprc33d.cloudfront.net/98bca980-012f-474c-a7a5-6d98ccc93e80.PNG) ![Capture1.PNG](https://ddgobkiprc33d.cloudfront.net/573582f4-7e1d-412b-ab7a-cf6cc2f0e590.PNG)</code></pre>
]]></description><link>https://forum.qt.io/topic/122026/valueerror-could-not-convert-string-to-float</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 13:42:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/122026.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Dec 2020 23:33:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ValueError: could not convert string to float on Wed, 23 Dec 2020 13:58:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/kromignon">@<bdi>KroMignon</bdi></a>  Well, i try to learn from anothers in every forum, sorry :), <a class="plugin-mentions-user plugin-mentions-a" href="/user/jsulm">@<bdi>jsulm</bdi></a> Thank you Sir, you are a Life saver :)</p>
]]></description><link>https://forum.qt.io/post/634030</link><guid isPermaLink="true">https://forum.qt.io/post/634030</guid><dc:creator><![CDATA[YassineKira]]></dc:creator><pubDate>Wed, 23 Dec 2020 13:58:59 GMT</pubDate></item><item><title><![CDATA[Reply to ValueError: could not convert string to float on Wed, 23 Dec 2020 08:03:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yassinekira">@<bdi>YassineKira</bdi></a> said in <a href="/post/633909">ValueError: could not convert string to float</a>:</p>
<blockquote>
<p dir="auto">ValueError: could not convert string to float: '78,38'</p>
</blockquote>
<p dir="auto">You know that floating point numbers in Python (and all other programming languages I know) use a dot instead of a colon?!<br />
So, 78,38 is NOT a floating POINT number! 78.38 is a floating point number. You should learn the basic stuff first...</p>
]]></description><link>https://forum.qt.io/post/633931</link><guid isPermaLink="true">https://forum.qt.io/post/633931</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Wed, 23 Dec 2020 08:03:32 GMT</pubDate></item><item><title><![CDATA[Reply to ValueError: could not convert string to float on Wed, 23 Dec 2020 07:02:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/yassinekira">@<bdi>YassineKira</bdi></a> This has nothing to do with Qt, this is a Python script issue</p>
]]></description><link>https://forum.qt.io/post/633925</link><guid isPermaLink="true">https://forum.qt.io/post/633925</guid><dc:creator><![CDATA[KroMignon]]></dc:creator><pubDate>Wed, 23 Dec 2020 07:02:32 GMT</pubDate></item></channel></rss>