Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating database with mysql #711

Closed
rleibman opened this issue Mar 26, 2013 · 3 comments
Closed

Error creating database with mysql #711

rleibman opened this issue Mar 26, 2013 · 3 comments

Comments

@rleibman
Copy link

I have a blank database,

When I run

gourmet --database-url=mysql://gourmet:gourmet@localhost/gourmet

I get:

We have a db_url and it is, mysql://gourmet:gourmet@localhost/gourmet
Traceback (most recent call last):
File "/usr/local/bin/gourmet", line 16, in
GourmetRecipeManager.startGUI()
File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 692, in startGUI
r=RecGui(splash_label=splash.label)
File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 895, in init
GourmetApplication.init(self, splash_label=splash_label)
File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 104, in init
self.setup_recipes() # Setup recipe database
File "/usr/local/lib/python2.7/dist-packages/gourmet/GourmetRecipeManager.py", line 193, in setup_recipes
self.rd = recipeManager.default_rec_manager()
File "/usr/local/lib/python2.7/dist-packages/gourmet/recipeManager.py", line 124, in default_rec_manager
return get_recipe_manager(**dbargs)
File "/usr/local/lib/python2.7/dist-packages/gourmet/recipeManager.py", line 119, in get_recipe_manager
return RecipeManager(**args)
File "/usr/local/lib/python2.7/dist-packages/gourmet/backends/db.py", line 1848, in init
RecData.init(self,_args,__kwargs)
File "/usr/local/lib/python2.7/dist-packages/gourmet/backends/db.py", line 165, in init
self.metadata.create_all()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 2515, in create_all
tables=tables)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2234, in _run_visitor
conn._run_visitor(visitorcallable, element, *_kwargs)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1904, in _run_visitor
*_kwargs).traverse_single(element)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 86, in traverse_single
return meth(obj, *_kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 67, in visit_metadata
self.traverse_single(table, create_ok=True)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 86, in traverse_single
return meth(obj, *_kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/ddl.py", line 86, in visit_table
self.connection.execute(schema.CreateTable(table))
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1405, in execute
params)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1490, in _execute_ddl
compiled = ddl.compile(dialect=dialect)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/expression.py", line 1722, in compile
return self._compiler(dialect, bind=bind, *_kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 2852, in _compiler
return dialect.ddl_compiler(dialect, self, **kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 699, in init
self.string = self.process(self.statement)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 718, in process
return obj._compiler_dispatch(self, *_kwargs)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 59, in _compiler_dispatch
return getter(visitor)(self, *kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/compiler.py", line 1377, in visit_create_table
not first_pk
File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py", line 1367, in get_column_specification
self.dialect.type_compiler.process(column.type)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 764, in process
return type
._compiler_dispatch(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 59, in compiler_dispatch
return getter(visitor)(self, **kw)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/compiler.py", line 1699, in visit_string
return self.visit_VARCHAR(type
)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/mysql/base.py", line 1654, in visit_VARCHAR
self.dialect.name)
sqlalchemy.exc.InvalidRequestError: VARCHAR requires a length on dialect mysql

@rleibman
Copy link
Author

rleibman commented May 9, 2013

Bump?

@ockham
Copy link
Collaborator

ockham commented May 10, 2013

@thinkle Could you look into this? I'm unfortunately quite busy ATM...

@rleibman
Copy link
Author

Hate to ask again... but can anyone look at this? Mostly because I have a presentation in a couple of weeks on a side project that needs the database (I'm creating a scala/play framework app that displays recipes from the sql database) and it would be really cool to show it off with the data I currently have.

@ockham ockham closed this as completed in 3c12f97 Jul 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants