ASP, Python, VBScript and sharing like friends
Shae Erisson
shapr at uab.edu
Thu Jun 15 20:42:41 EDT 2000
millja at my-deja.com wrote:
To: python-list at python.org
Sender: python-list-admin at python.org
Errors-To: python-list-admin at python.org
X-BeenThere: python-list at python.org
X-Mailman-Version: 2.0beta3
Precedence: bulk
List-Id: General discussion list for the Python programming language <python-list.python.org>
>
> Here is an example of what I mean.
>
> <SCRIPT RUNAT = SERVER LANGUAGE=Python>
> def Test4(number):
> return number + 3, number + 4
> </SCRIPT>
> Our numbers of the day are
> <%
> =Test4(10)
> %>.
>
> I get a Type Mismatch, An unhandled data type was encountered error.
Path: news!uunet!ffx.uu.net!newsfeed.easynews.net!easynews.net!newsfeed.germany.net!news.vas-net.net!newsfeed.icl.net!colt.net!newspeer.highwayone.net!newsfeed1.telenordia.se!algonet!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!central.inet.fi!inet.fi!read2.inet.fi.POSTED!not-for-mail
Xref: news comp.lang.python:99850
I can only offer guesses, I've never done ASP w/PythonScript
Have you tried turning your number into a string before you return it?
<SCRIPT RUNAT = SERVER LANGUAGE=Python>
def Test4(number):
return str(number + 3, number + 4)
</SCRIPT>
Do you know exactly where the error is happening? Is it only in the
returned value?
Try some experimental incremental scripts like this:
<SCRIPT RUNAT = SERVER LANGUAGE=Python>
def Test5(number):
return (1,'I can return numbers<BR>')
</SCRIPT>
<SCRIPT RUNAT = SERVER LANGUAGE=Python>
def Test6():
return 'I can return strings.<BR>'
</SCRIPT>
<SCRIPT RUNAT = SERVER LANGUAGE=Python>
def Test7(handyString):
return 'I can pass and return %s.<BR>' % handyString
</SCRIPT>
<%
=Test7('strings')
%>
I'm sure you can come up with more things to test... When you test each
thing your code does separately, you can usually find the problem.
--
sHae mAtijs eRisson (sHae at wEbwitchEs.coM) gEnius fOr hIre
squirrels furnished by Paul E Black, the world is safe
More information about the Python-list
mailing list