<?xml version="1.0" encoding="windows-1252"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Miva Merchant Community Forums - Designers and Developers</title>
		<link>https://www.miva.com/forums/</link>
		<description />
		<language>en</language>
		<lastBuildDate>Tue, 21 Apr 2026 09:10:43 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>images/misc/rss.png</url>
			<title>Miva Merchant Community Forums - Designers and Developers</title>
			<link>https://www.miva.com/forums/</link>
		</image>
		<item>
			<title>MvCALL Array Index error with no Array</title>
			<link>https://www.miva.com/forums/forum/designers-and-developers/mivascript-miva-merchant-empresa/725325-mvcall-array-index-error-with-no-array</link>
			<pubDate>Mon, 30 Mar 2026 16:42:16 GMT</pubDate>
			<description>We are stumped.  Works fine with python and curl.  But using MvCALL is returning this error: Fatal error in MiscRepo\Test_Groq.mvc @...</description>
			<content:encoded><![CDATA[We are stumped.  Works fine with python and curl.  But using MvCALL is returning this error: Fatal error in MiscRepo\Test_Groq.mvc @ [00000000:00000302]: E:\MiscRepo\Test_Groq.mv: Line 46: Array index must be positive integer.  <br />
<br />
Interestingly we comment out the api_key and we still get the error.  If we also comment out the payload - we get authentication error.  If we add back the key without payload - expected error.  IF we add back payload (with key) - the fatal error.<br />
<br />
Using normal &lt;MvCAPTURE&gt; - same result<br />
<br />
&lt;MIVA STANDARDOUTPUTLEVEL=&quot;html,text,compresswhitespace&quot; &gt;<br />
<br />
&lt;MvASSIGN NAME = &quot;g.groqkey&quot; VALUE = &quot;REDACTED-THIS&quot;&gt;<br />
<br />
&lt;MvASSIGN NAME=&quot;l.payload&quot; VALUE='{&quot;model&quot;:&quot;openai/gpt-oss-120b&quot;,&quot;messages&quot;:[{&quot;role&quot;:&quot;user&quot;,&quot;content&quot;:&quot;Hello&quot;}],&quot;max_tokens&quot;:50,&quot;stream&quot;:false}'&gt;<br />
<br />
&lt;MvASSIGN NAME=&quot;l.rawresponse&quot; VALUE=&quot;&quot;&gt;<br />
<br />
&lt;Miva MvCALL_ERROR=&quot;nonfatal,nodisplay&quot;&gt;<br />
&lt;MvCALL ACTION=&quot;https://api.groq.com/openai/v1/chat/completions&quot;<br />
METHOD=&quot;RAW&quot;<br />
CONTENT-TYPE=&quot;application/json&quot;<br />
HEADERS=&quot;{ 'Authorization: Bearer ' $ g.groqkey }&quot;<br />
FIELDS=&quot;{ l.payload }&quot;&gt;<br />
&lt;MvASSIGN NAME=&quot;l.rawresponse&quot; VALUE=&quot;{ l.rawresponse $ s.callvalue }&quot;&gt;<br />
&lt;MvCALLSTOP&gt;<br />
&lt;/MvCALL&gt;<br />
&lt;Miva MvCALL_ERROR=&quot;fatal,display&quot;&gt;<br />
<br />
Raw Response: &lt;MvEVAL EXPR=&quot;{ miva_json_decode(l.rawresponse, l.theresult) }&quot;&gt;<br />
theresult: &lt;MvEVAL EXPR = &quot;{ l.theresult }&quot;&gt;&lt;BR&gt;<br />
<br />
Thanks for any assistance.<br />
<br />
-mike<br />
<br />
<br />
 ]]></content:encoded>
			<category domain="https://www.miva.com/forums/forum/designers-and-developers/mivascript-miva-merchant-empresa"><![CDATA[MivaScript &amp;  Miva Empresa]]></category>
			<dc:creator>MLT</dc:creator>
			<guid isPermaLink="true">https://www.miva.com/forums/forum/designers-and-developers/mivascript-miva-merchant-empresa/725325-mvcall-array-index-error-with-no-array</guid>
		</item>
	</channel>
</rss>
