Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:module': 0.04; 'postgresql': 0.05; 'suppose': 0.05; 'subject:Python': 0.05; 'attribute': 0.07; 'subject:object': 0.07; 'python': 0.08; 'consult': 0.09; 'filename': 0.09; 'path.': 0.09; 'problem:': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'retcode': 0.09; 'skip:" 60': 0.09; 'stuck.': 0.09; 'error:': 0.10; 'debugging': 0.13; "subject:' ": 0.15; '.py': 0.16; '345,': 0.16; 'options)': 0.16; 'problem!': 0.16; 'received:dip.t-dialin.net': 0.16; 'received:t-dialin.net': 0.16; 'linux': 0.17; 'wrote:': 0.18; 'appears': 0.19; '(most': 0.21; 'trying': 0.21; 'earlier': 0.23; 'from:addr:web.de': 0.23; 'fine': 0.24; "python's": 0.24; 'traceback': 0.24; 'module': 0.26; 'work.': 0.27; 'function': 0.27; 'paul': 0.28; "i'm": 0.28; 'print': 0.29; 'commands,': 0.30; 'error': 0.30; 'file.': 0.31; 'version': 0.32; 'everyone,': 0.32; 'anyone': 0.32; 'google,': 0.32; 'idea': 0.32; "won't": 0.33; 'named': 0.33; 'object': 0.33; 'file': 0.34; 'header:X-Complaints- To:1': 0.34; 'last):': 0.34; 'probably': 0.35; 'to:addr:python- list': 0.35; 'skip:" 20': 0.35; 'install': 0.35; 'received:org': 0.36; 'executing': 0.37; 'but': 0.37; 'shows': 0.37; 'either': 0.37; 'could': 0.38; 'some': 0.38; 'seeing': 0.38; 'problems': 0.38; '(with': 0.39; 'user': 0.40; 'might': 0.40; 'to:addr:python.org': 0.40; 'john': 0.61; 'your': 0.61; 'engine': 0.65; 'thankful': 0.73; "program's": 0.84; 'printers': 0.91; 'touched': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: PyKota, Python: AttributeError: 'module' object has no attribute '_quote' Date: Mon, 20 Feb 2012 18:26:12 +0100 Organization: None References: <1329749827797-4487915.post@n6.nabble.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p50849f05.dip.t-dialin.net X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 68 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1329758776 news.xs4all.nl 6955 [2001:888:2000:d::a6]:52428 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:20627 JohannesTU wrote: > Hello everyone, > > I'm new to linux/suse, but I was given the task to install the print > accounting software PyKota. > Before that I never even touched a linux system, so I don't have any basic > knowlegde at all! > Up to now I was able to solve all problems with the help of google, but > now I'm stuck. > > My problem: > > > linux-6n5c:/usr/local/bin # pkusers --add john paul > Creation... > ERROR: PyKota v1.26_official > ERROR: pkusers failed > ERROR: Traceback (most recent call last): > ERROR: File "/usr/local/bin/pkusers", line 442, in > ERROR: retcode = manager.main(args, options) > ERROR: File "/usr/local/bin/pkusers", line 345, in main > ERROR: oldentry = getattr(self.storage, "add%s" % suffix)(entry) > ERROR: File > "/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 598, > in addUser > ERROR: oldentry = self.getUser(user.Name) > ERROR: File > "/usr/local/lib/python2.7/site-packages/pykota/storage.py", line 623, in > getUser > ERROR: user = self.getUserFromBackend(username) > ERROR: File > "/usr/local/lib/python2.7/site-packages/pykota/storages/sql.py", line 355, > in getUserFromBackend > ERROR: % self.doQuote(self.userCharsetToDatabase(username))) > ERROR: File > "/usr/local/lib/python2.7/site-packages/pykota/storages/pgstorage.py", > line 144, in doQuote > ERROR: return pg._quote(field, typ) > ERROR: AttributeError: 'module' object has no attribute '_quote' > > > I have no idea how to deal with it or what it even means! I suppose you have successfully repaired your car, but don't know what an engine might be ;) > Executing "linux-6n5c:/usr/local/bin # pkusers" works fine and shows me > commands, version number etc. > But adding users or printers (with pkprinters) won't work. > > I would be really thankful if anyone could give me some advice or hints > how to solve the problem! The error traceback explained: Python is trying to call a function named _quote() in a module named pg. The most likely reason is either that you have the wrong version of the module or a module unrelated to the required one that has the same name and appears earlier in Python's search path. You can start debugging with $ python2.7 -c'import pg; print pg.__file__' to find out the filename and then look into the corresponding .py file. If that is related to postgresql you are probably seeing a version mismatch. Consult PyKota's documentation to find out the program's dependencies.