<?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[MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27;]]></title><description><![CDATA[<p dir="auto">Running on Raspberry Pi 3 and Pi-camera on Raspian buster latest. When testing the MMM-Face_Reco-DDN <a href="http://facerecognition.py" target="_blank" rel="noopener noreferrer nofollow ugc">facerecognition.py</a> module stand alone, faces are correctly identified in the camera and [names] output. However, when running from MagicMirror, the error occurs, and it looks like it is complaining about improper use of a boolean operator in the code. I don’t know python data class rules, but if this was a code issue, surely others woudl have seen it in this module?  Do I maybe have a lost data class object or something?  PythonSherrError: TypeError: ‘&lt;’ not supported between instances of ‘numpy.ndarray’ and ‘str’ is received, and the python traceback seems to point to the <a href="http://facerecognition.py" target="_blank" rel="noopener noreferrer nofollow ugc">facerecognition.py</a> module.```</p>
<pre><code>[ERROR]  Whoops! There was an uncaught exception...
[2020-07-20 13:16:36.029] [ERROR]  PythonShellError: TypeError: '&lt;' not supported between instances of 'numpy.ndarray' and 'str'
    at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21)
    at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)
    at ChildProcess.&lt;anonymous&gt; (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)
    at ChildProcess.emit (events.js:200:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
    ----- Python Traceback -----
    File "modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line 143, in &lt;module&gt;
      if minDistance &lt; args["tolerance"]: {
  traceback: 'Traceback (most recent call last):\n  File ' +
    '"modules/MMM-Face-Reco-DNN/tools/facerecognition.py", line ' +
    '143, in &lt;module&gt;\n    if minDistance &lt; args["tolerance"]:\n' +
    "TypeError: '&lt;' not supported between instances of " +
    "'numpy.ndarray' and 'str'\n",
  executable: 'python3',
  options: null,
  script: 'modules/MMM-Face-Reco-DNN/tools/facerecognition.py',
  args: [
    '--cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml',
    '--encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle',
    '--usePiCamera=1',
    '--source=0',
    '--rotateCamera=0',
    '--method=dnn',
    '--detectionMethod=hog',
    '--interval=2000',
    '--output=0',
    '--extendDataset=False',
    '--dataset=modules/MMM-Face-Reco-DNN/dataset/',
    '--tolerance=0.6'
  ],
  exitCode: 1

</code></pre>
]]></description><link>https://forum.magicmirror.builders/topic/13321/mmm-face-reco-dnn-typeerror-not-supported-between-instances-of-numpy-ndarray-and-str</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 05:52:47 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/13321.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2020 19:14:37 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Fri, 24 Jul 2020 17:28:06 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ghiesseldorf" aria-label="Profile: ghiesseldorf">@<bdi>ghiesseldorf</bdi></a>  Thanks a lot, I had the same error after the last update and it fixed it for me</p>
]]></description><link>https://forum.magicmirror.builders/post/79113</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79113</guid><dc:creator><![CDATA[kobiavr]]></dc:creator><pubDate>Fri, 24 Jul 2020 17:28:06 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Tue, 21 Jul 2020 23:34:39 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ghiesseldorf" aria-label="Profile: ghiesseldorf">@<bdi>ghiesseldorf</bdi></a> I was working on a 4 yr old piece of code a couple weeks ago that was suddenly failing.  turns out the node version fixed some expression evaluation problem, and boom it broke old unchanged code,<br />
now, the expression should have returned false, as it does now. but did return true.</p>
]]></description><link>https://forum.magicmirror.builders/post/79002</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79002</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 21 Jul 2020 23:34:39 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Tue, 21 Jul 2020 23:20:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sdetweil" aria-label="Profile: sdetweil">@<bdi>sdetweil</bdi></a> “after all this time” is right! I kept telling myself the issue couldn’t be the code itself because there were no posts about it on the forum, so it had to be something I (or my environment) was doing wrong.</p>
]]></description><link>https://forum.magicmirror.builders/post/79000</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/79000</guid><dc:creator><![CDATA[ghiesseldorf]]></dc:creator><pubDate>Tue, 21 Jul 2020 23:20:18 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Tue, 21 Jul 2020 00:41:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ghiesseldorf" aria-label="Profile: ghiesseldorf">@<bdi>ghiesseldorf</bdi></a> good catch! why suddenly float after all this time?</p>
]]></description><link>https://forum.magicmirror.builders/post/78948</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78948</guid><dc:creator><![CDATA[sdetweil]]></dc:creator><pubDate>Tue, 21 Jul 2020 00:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Mon, 20 Jul 2020 21:33:11 GMT]]></title><description><![CDATA[<p dir="auto">FIXED: updated the ap.add_argument statement (line 66) of <a href="http://facerecognition.py" target="_blank" rel="noopener noreferrer nofollow ugc">facerecognition.py</a> to include “type=float” on the --tolerance variable</p>
]]></description><link>https://forum.magicmirror.builders/post/78947</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78947</guid><dc:creator><![CDATA[ghiesseldorf]]></dc:creator><pubDate>Mon, 20 Jul 2020 21:33:11 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Mon, 20 Jul 2020 20:45:19 GMT]]></title><description><![CDATA[<p dir="auto">It does look like there is a dataclass issue with the “tolerance” variable. Running <a href="http://facerecognition.py" target="_blank" rel="noopener noreferrer nofollow ugc">facerecognition.py</a> from the commandline with only the --cascade &amp; --encodings parameters, the module executes. However, if adding the --tolerance parameter which alters the variable from the default value, it fails on the boolean statement. Also, even commenting out the variable in the MM config.js file apparently still passes something to the module for this variable, because it fails the same as including the --tolerance value at stand alone startup.  So, any thoughts on how to fix it??</p>
]]></description><link>https://forum.magicmirror.builders/post/78942</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78942</guid><dc:creator><![CDATA[ghiesseldorf]]></dc:creator><pubDate>Mon, 20 Jul 2020 20:45:19 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-Face-Reco-DNN TypeError: &#x27;&lt;&#x27; not supported between instances of &#x27;numpy.ndarray&#x27; and &#x27;str&#x27; on Mon, 20 Jul 2020 19:17:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/ghiesseldorf" aria-label="Profile: ghiesseldorf">@<bdi>ghiesseldorf</bdi></a> ```<br />
[ERROR]  Whoops! There was an uncaught exception…<br />
[2020-07-20 13:16:36.029] [ERROR]  PythonShellError: TypeError: ‘&lt;’ not supported between instances of ‘numpy.ndarray’ and ‘str’<br />
at PythonShell.parseError (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:246:21)<br />
at terminateIfNeeded (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:129:32)<br />
at ChildProcess. (/home/pi/MagicMirror/modules/MMM-Face-Reco-DNN/node_modules/python-shell/index.js:121:13)<br />
at ChildProcess.emit (events.js:200:13)<br />
at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)<br />
----- Python Traceback -----<br />
File “modules/MMM-Face-Reco-DNN/tools/facerecognition.py”, line 143, in <br />
if minDistance &lt; args[“tolerance”]: {<br />
traceback: 'Traceback (most recent call last):\n  File ’ +<br />
'“modules/MMM-Face-Reco-DNN/tools/facerecognition.py”, line ’ +<br />
‘143, in \n    if minDistance &lt; args[“tolerance”]:\n’ +<br />
"TypeError: ‘&lt;’ not supported between instances of " +<br />
“‘numpy.ndarray’ and ‘str’\n”,<br />
executable: ‘python3’,<br />
options: null,<br />
script: ‘modules/MMM-Face-Reco-DNN/tools/facerecognition.py’,<br />
args: [<br />
‘–cascade=modules/MMM-Face-Reco-DNN/tools/haarcascade_frontalface_default.xml’,<br />
‘–encodings=modules/MMM-Face-Reco-DNN/tools/encodings.pickle’,<br />
‘–usePiCamera=1’,<br />
‘–source=0’,<br />
‘–rotateCamera=0’,<br />
‘–method=dnn’,<br />
‘–detectionMethod=hog’,<br />
‘–interval=2000’,<br />
‘–output=0’,<br />
‘–extendDataset=False’,<br />
‘–dataset=modules/MMM-Face-Reco-DNN/dataset/’,<br />
‘–tolerance=0.6’<br />
],<br />
exitCode: 1</p>
<pre><code></code></pre>
]]></description><link>https://forum.magicmirror.builders/post/78928</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/78928</guid><dc:creator><![CDATA[ghiesseldorf]]></dc:creator><pubDate>Mon, 20 Jul 2020 19:17:05 GMT</pubDate></item></channel></rss>