Hello,
while using gadfly, got an error that i don't understand.
Code is as follow :
cursor = connection.curs or()
cursor.execute( 'select id_m from mots where nom_m = "%s"' % nom_m)
id_m = cursor.fetchall ()
Error message :
File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 567, in
getmember
(Token,skip) = self.LexDict.To ken(self.String , self.Position)
File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 433, in
Token
raise LexTokenError, "Lexical token not found "+info
gadfly.kjParser .LexTokenError: Lexical token not found near ::
' where nom_m = '*'"Ancient s Pled'
Stored value seems to interfere with somethong ? Am i wrong ? Did i
missed something ? Thanks in advance for any help. 3 1522
"niko" <n.*********@no os.fr> wrote: while using gadfly, got an error that i don't understand. Code is as follow : cursor = connection.curs or() cursor.execute( 'select id_m from mots where nom_m = "%s"' % nom_m) id_m = cursor.fetchall ()
Error message : File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 567, in getmember (Token,skip) = self.LexDict.To ken(self.String , self.Position) File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 433, in Token raise LexTokenError, "Lexical token not found "+info gadfly.kjParser .LexTokenError: Lexical token not found near :: ' where nom_m = '*'"Ancient s Pled'
Stored value seems to interfere with somethong ? Am i wrong ? Did i missed something ? Thanks in advance for any help.
the "%" operator does the substitution *before* the execute method is
called.
maybe you meant
cursor.execute( 'select id_m from mots where nom_m = %s', nom_m)
?
</F>
Fredrik Lundh wrote: "niko" <n.*********@no os.fr> wrote:
while using gadfly, got an error that i don't understand. Code is as follow : cursor = connection.curs or() cursor.execute( 'select id_m from mots where nom_m = "%s"' % nom_m) id_m = cursor.fetchall ()
Error message : File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 567, in getmember (Token,skip) = self.LexDict.To ken(self.String , self.Position) File "C:\Python24\Li b\site-packages\gadfly \kjParser.py", line 433, in Token raise LexTokenError, "Lexical token not found "+info gadfly.kjPars er.LexTokenErro r: Lexical token not found near :: ' where nom_m = '*'"Ancient s Pled'
Stored value seems to interfere with somethong ? Am i wrong ? Did i missed something ? Thanks in advance for any help.
the "%" operator does the substitution *before* the execute method is called.
maybe you meant
cursor.execute( 'select id_m from mots where nom_m = %s', nom_m)
?
</F>
I suspect he actually meant
cursor.execute( "select id_m from mots where nom_m = '%s'" % nom_m)
or perhaps
cursor.execute( "select id_m from mots where nom_m = %s", (nom_m, ))
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
On Wed, 17 Aug 2005 11:01:42 +0100, Steve Holden <st***@holdenwe b.com>
declaimed the following in comp.lang.pytho n: Fredrik Lundh wrote: "niko" <n.*********@no os.fr> wrote:
while using gadfly, got an error that i don't understand. Code is as follow : cursor = connection.curs or() cursor.execute( 'select id_m from mots where nom_m = "%s"' % nom_m) id_m = cursor.fetchall ()
raise LexTokenError, "Lexical token not found "+info gadfly.kjPars er.LexTokenErro r: Lexical token not found near :: ' where nom_m = '*'"Ancient s Pled'
Off hand...
I'd suspect a problem with that * and the mass of quotes. cursor.execute( 'select id_m from mots where nom_m = %s', nom_m)
I suspect he actually meant
cursor.execute( "select id_m from mots where nom_m = '%s'" % nom_m)
or perhaps
cursor.execute( "select id_m from mots where nom_m = %s", (nom_m, ))
Well... I don't know the Gadfly code, but the MySQLdb code is
perfectly happy with a non-tuple for single substitution... But yes, in
either case I believe what /should/ be used is the deferred parameter
substitution using the db-api defined form; properly implemented, it
should escape that * and embedded 's...
-- =============== =============== =============== =============== == < wl*****@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG < wu******@dm.net | Bestiaria Support Staff < =============== =============== =============== =============== == < Home Page: <http://www.dm.net/~wulfraed/> < Overflow Page: <http://wlfraed.home.ne tcom.com/> < This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Patrick W. Fraley |
last post by:
Hi Everybuddy,
I am having a little problem I can not find a solution for.
I am trying to use the SQL-LIKE statement in gadfly. After googling
around I found out that it is not supported, and that on is supposed to
use a regular expression. All great, but there is nowhere a reference
to be found on how to do this. No examples, no nothing, just the
comment to use regular expressions.
|
by: Brian O. Bush |
last post by:
A while ago, I recall hearing that Gadfly might be included into the
python standard library. What happened?
As I recall, the issue was the license.
Brian
|
by: R.Marquez |
last post by:
I tried installing gadfly 1.0 on Mandrake 9.2 and got the following:
# python setup.py install
running install
error: invalid Python installation: unable to open
/usr/lib/python2.3/config/Makefile (No such file or directory)
#
Of course, the error is correct in that there is no such file. There
is not even a python2.3/ config directory. Is the Mandrake
|
by: Ian Pellew |
last post by:
Hi all;
Is there a Windows version of gadfly anywhere?
All my searching gets me to Linux stuff
(not that I have anything against Linux, rather I use Solaris)
Regards
Ian
|
by: Thomas |
last post by:
Hi,
i have a webserver with (approx.) the code below, but whatever i do
the html code sent to the browser stays the same.
The strangest is, if i insert a local variable in the class which is incremented
upon each call to self.render_GET() and append it to the html code, it
increments correctly on the browser. Could it be a probem with gadfly?
from twisted.web import resource, server
| |
by: Tommy |
last post by:
Hello
I've got problems while using py2exe, because of a module I'm using : gadfly
In fact, I had the same problem with Pmw, and the solution was to create a
single file Pmw.py which contained all the parts of the original module, and
to put it in the project's main folder.
So, I'd like to make a "freezed" version of gadfly, in order to create a
fixed win32 exe. But it's more difficult than with Pmw... so does anyone
know another way...
|
by: chris |
last post by:
I'm looking for a completely in-memory sql db. I have seen gadfly, but
its startup method seems to require a directory for the on-disk file
storage. I have a script and I want to create a database/tables in the
script, insert some data (not much), and execute some queries, all
in-memory. Don't need to persist anything. Possible, or am I just
talking crazy here?
Thanks,
Chris
|
by: jean-jeanot |
last post by:
I am writing a prototype program whose aim is to collect bookkeeping
transactions in a Database ( Gadfly).
After creating the table I create the variables with
varAmount = StringVar()
I then create labels in Tkinter to ease the input of data.
With a function
def treatment ():
requete = "insert into transactions ( date,amount,,....)
values(......) "% (varDate.get(),
varAmount.get
|
by: Ralf Muschall |
last post by:
Hello,
I just tried the recent gadfly (from SF), using Python
2.4.2 (hand built, since my Suse 8.2 had only 2.2.2).
The direct operation of gadfly works.
After calling gfserver, I get (in addition to a complete
users manual dumped on the screen) the following error
message:
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |