Troubleshoot Me

monkfish

what are birds? we just don't know.
is a Community Contributoris a Forum Moderator Alumnus
Hi to whoever happens to read this

I'm setting up my system so I can develop for the site, as per ryu's guide in IS (shiv sent it to me). However, when I run test.py at the end, the following traceback is shown on localhost:9999

Code:
Traceback (most recent call last):
  File "c:\python25\lib\site-packages\colubrid-0.10-py2.5.egg\colubrid\debug.py", line 921, in __call__
    result = self.application(environ, start_response)
  File "c:\python25\lib\site-packages\colubrid-0.10-py2.5.egg\colubrid\server.py", line 47, in __call__
    return self.application(environ, start_response)
  File "C:\Programming\smogon\app.py", line 13, in __init__
    for mapping in mappings
  File "C:\Programming\smogon\app.py", line 11, in 
    for project in self.projects)
  File "C:\Programming\smogon\dex\controllers.py", line 476, in 
    pokemon = _ac_gen(pokemon_gens),
  File "C:\Programming\smogon\dex\controllers.py", line 469, in _ac_gen
    for gen, table in table_gen.iteritems())
  File "C:\Programming\smogon\dex\controllers.py", line 469, in 
    for gen, table in table_gen.iteritems())
  File "C:\Programming\smogon\dex\controllers.py", line 462, in _ac_compile
    pick("name").
  File "C:\Python25\Lib\site-packages\lightorm\query.py", line 89, in pick
    self._select.append_column(replace_selectable(column, self._last_table))
  File "C:\Python25\Lib\site-packages\lightorm\util.py", line 14, in replace_selectable
    return util.ClauseAdapter(table).traverse(clause, clone=True)
TypeError: traverse() got an unexpected keyword argument 'clone'
Shiv thinks it is something to do with me not setting up the database correctly. I have set up a schema called "dex" where I ran the dex.sql script given to me by chaos, and all the tables are created and filled out correctly etc.

Any pointers?
 
I am not familiar with Python so forgive me if this does not help.

Looking at the traceback, in the last line, it seems the traverse function does not expect the second (clone) argument? Or maybe its datatype (boolean) is wrong?
 

monkfish

what are birds? we just don't know.
is a Community Contributoris a Forum Moderator Alumnus
yeah CN i agree, problem is none of that code is mine and it seems to work for other people :) so i am guessing there's some stage of setup that's gone wrong

im using python 2.5, not 2.6, but i wouldnt have expected that to cause an extra keyword error unless colubrid has removed that keyword from 2.5? seems unlikely since colubrid is low in the stack
 
start command prompt,
Code:
easy_install http://nchc.dl.sourceforge.net/sourceforge/sqlalchemy/SQLAlchemy-0.4.8.tar.gz
the problem was caused by the newer version of sqlalchemy. notice the last lines in traceback:

Code:
  File "C:\Python25\Lib\site-packages\lightorm\util.py", line 14, in replace_selectable
    return util.ClauseAdapter(table).traverse(clause, clone=True)
from util.py in lightorm:

Code:
from sqlalchemy.sql import util
hence we know that util under util.ClauseAdapter refers to sqlalchemy.util, and hence the problem is linked to sqlalchemy!

(further reinforced by <m0nkfish> 0.5.4.p2)
 

monkfish

what are birds? we just don't know.
is a Community Contributoris a Forum Moderator Alumnus
thanks ryu that worked but now i have another error!

Code:
Traceback (most recent call last):
  File "c:\python25\lib\site-packages\colubrid-0.10-py2.5.egg\colubrid\debug.py", line 921, in __call__
    result = self.application(environ, start_response)
  File "c:\python25\lib\site-packages\colubrid-0.10-py2.5.egg\colubrid\server.py", line 47, in __call__
    return self.application(environ, start_response)
  File "C:\Programming\smogon\app.py", line 13, in __init__
    for mapping in mappings
  File "C:\Programming\smogon\app.py", line 11, in 
    for project in self.projects)
  File "C:\Programming\smogon\site\controllers.py", line 21, in 
    from smogon.helpers.search import searchstr, searchurl, google
  File "C:\Programming\smogon\helpers\search.py", line 2, in 
    from advas.phonetics import metaphone
  File "C:\Python25\lib\site-packages\advas\__init__.py", line 9, in 
    from advas import *
  File "C:\Python25\lib\site-packages\advas\advas.py", line 22, in 
    from successorVariety import *
  File "C:\Python25\lib\site-packages\advas\successorVariety.py", line 25
SyntaxError: Non-ASCII character '\xc3' in file C:\Python25\lib\site-packages\advas\successorVariety.py on line 25, but no encoding declared; see [URL]http://www.python.org/peps/pep-0263.html[/URL] for details (successorVariety.py, line 25)
edit: apparently python doesn't like "non-ascii" characters in comments, thanks ryu
 
(note that this too was fixed on IRC, but a very cheap workaround was used.)

line 25 said:
alphabet = "abcdefghijklmnopqrstuvwxyz' -+" # äöüß@' "
removing stuff after # did the trick, but it shouldn't even have caused a problem. it doesn't, at mine or Shiv's end. maybe chaos can shed some light on it?
 

monkfish

what are birds? we just don't know.
is a Community Contributoris a Forum Moderator Alumnus
I noticed this when using the word "Pokémon", which prompted me to investigate further. I was using PyScripter, which apparently doesn't save in a UTF-8 format by default. Saving the file in utf-8 using Notepad (lol) then re-opening and editing in PyScripter did the job.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 0)

Top