I'm new to pyramids and python, so forgive me my stupid questions. The required things for my project are: working with python 3, using assynchronous calls to the server.
Currently I'm trying to set up a connection to my MySQL database located at 127.0.0.1:3306. I think I need to change this code in the development.ini file: sqlalchemy.url = sqlite:///%(here)s/projectje.sqlite to sqlalchemy.url = mysql://admin:[email protected]/dbeerste Are there anny other lines I need to change to make this work, and why? We also don't know if we need to put annything more in the requires list. This is the error message I'm getting right now. C:\env\testproj>..\Scripts\python setup.py develop --> some output but seems to do it without a problem C:\env\testproj>..\Scripts\pserve development.ini --reload Starting subprocess with file monitor Traceback (most recent call last): File "C:\env\Scripts\pserve-script.py", line 9, in <module> load_entry_point('pyramid==1.4', 'console_scripts', 'pserve')() File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 50, in main return command.run() File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 304, in run global_conf=vars) File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 328, in loadapp return loadapp(app_spec, name=name, relative_to=relative_to, **kw) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 247, in loadapp return loadobj(APP, uri, name=name, **kw) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 272, in loadobj return context.create() File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 710, in create return self.object_type.invoke(self) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 146, in invoke return fix_call(context.object, context.global_conf, **context.local_conf) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\util.p y", line 56, in fix_call val = callable(*args, **kw) File "c:\env\testproj\testproj\__init__.py", line 13, in main engine = engine_from_config(settings, 'sqlalchemy.') File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ __init__.py", line 350, in engine_from_config return create_engine(url, **opts) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ __init__.py", line 331, in create_engine return strategy.create(*args, **kwargs) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ strategies.py", line 64, in create dbapi = dialect_cls.dbapi(**dbapi_args) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\connect ors\mysqldb.py", line 57, in dbapi return __import__('MySQLdb') ImportError: No module named 'MySQLdb' First we tried using our full connection string which worked in Pythonwin to connect and send querry's to our mysql database. engine = create_engine('mysql+mysqlconnector://admin:[email protected]/dbeerste', echo=True) which we changed to ==> sqlalchemy.url = mysql+mysqlconnector://admin:[email protected]/dbeerste but that also wouldn't work. C:\env\testproj>..\Scripts\pserve development.ini --reload Starting subprocess with file monitor Traceback (most recent call last): File "C:\env\Scripts\pserve-script.py", line 9, in <module> load_entry_point('pyramid==1.4', 'console_scripts', 'pserve')() File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 50, in main return command.run() File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 304, in run global_conf=vars) File "C:\env\lib\site-packages\pyramid-1.4-py3.3.egg\pyramid\scripts\pserve.py ", line 328, in loadapp return loadapp(app_spec, name=name, relative_to=relative_to, **kw) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 247, in loadapp return loadobj(APP, uri, name=name, **kw) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 272, in loadobj return context.create() File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 710, in create return self.object_type.invoke(self) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\loadws gi.py", line 146, in invoke return fix_call(context.object, context.global_conf, **context.local_conf) File "C:\env\lib\site-packages\pastedeploy-1.5.0-py3.3.egg\paste\deploy\util.p y", line 56, in fix_call val = callable(*args, **kw) File "c:\env\testproj\testproj\__init__.py", line 13, in main engine = engine_from_config(settings, 'sqlalchemy.') File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ __init__.py", line 350, in engine_from_config return create_engine(url, **opts) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ __init__.py", line 331, in create_engine return strategy.create(*args, **kwargs) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\engine\ strategies.py", line 64, in create dbapi = dialect_cls.dbapi(**dbapi_args) File "C:\env\lib\site-packages\sqlalchemy-0.8.0b2-py3.3.egg\sqlalchemy\dialect s\mysql\mysqlconnector.py", line 77, in dbapi from mysql import connector ImportError: No module named 'mysql' Anny respons is most appriciated -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pylons-discuss?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
