I'm trying to auto generate a schema for use in SQLalchemy, I'm using sqlautocode to do this, I use the following command

D:~ admin$ sqlautocode mysql://'user':"pass"@xx.xx.xx.xx:3306/db_name -o tables.py

but I keep getting the following error..

Traceback (most recent call last):
File "/usr/local/bin/sqlautocode", line 9, in <module>
load_entry_point('sqlautocode==0.7', 'console_scripts', 'sqlautocode')()
File "/Library/Python/2.7/site-packages/distribute-0.6.45-py2.7.egg/pkg_resources.py", line 343, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Library/Python/2.7/site-packages/distribute-0.6.45-py2.7.egg/pkg_resources.py", line 2354, in load_entry_point
return ep.load()
File "/Library/Python/2.7/site-packages/distribute-0.6.45-py2.7.egg/pkg_resources.py", line 2060, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Python/2.7/site-packages/sqlautocode/main.py", line 4, in <module>
from declarative import ModelFactory
File "/Library/Python/2.7/site-packages/sqlautocode/declarative.py", line 17, in <module>
from sqlalchemy.ext.declarative import _deferred_relation as _deferred_relationship
ImportError: cannot import name _deferred_relation

Use sqlacodegen instead:

D:~ admin$ sqlacodegen mysql://'users':"pass"@xx.xx.xx.xx:3306/db_name --outfile tables.py

SQLAutoCode - error when attempting to generate schema的更多相关文章

  1. Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with value '"*, Microsoft.AspNet.Mvc.TagHelpers"'

    project.json 配置: { "version": "1.0.0-*", "compilationOptions": { " ...

  2. VS2015突然报错————Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with value 'Microsoft.AspNet.Mvc.Razor.TagHelpers.UrlResolutionTagHelper

    Encountered an unexpected error when attempting to resolve tag helper directive '@addTagHelper' with ...

  3. [转]GitHub for Windows 安装失败,An error occurred attempting to install github 的解决办法

    解决办法: 只需要将 http://github-windows.s3.amazonaws.com/GitHub.application http改为https,然后在IE上打开,安装即可 问题如下 ...

  4. lr使用linux Generator测试https莫名报 SSL protocol error when attempting to connect with host

    接收一个性能测试任务,各种原因需要使用linux agent产生压力.诡异的事发生了,同样脚本windows回放成功,使用linux agent报如下错误,脚本回放失败. Action.c(33): ...

  5. DataGrip:Error encountered when performing Introspect schema xxx 错误的解决方法

    datagrip的问题,转载自: https://www.cnblogs.com/geb515/p/7995249.html 把Introspect using JDBC _metadata打上勾 然 ...

  6. hyper-v启动虚拟机时提示“The application encountered an error while attempting to change the state of the machine ‘虚拟机名称'”如何处理?

    1. 找出发生这一问题的事件代号 1.1 在开始菜单中搜索程序Event Viewer并点击进入 1.2 点击路径如下: “Applications and Services Logs > Mi ...

  7. an error occurred attempting install_Github_for_windows_无法安装的解决方法_

    都在这了,作者原创.我就截图好了.

  8. 错误:The following error occurred attempting to run the DNX design time process (dnx-clr-win-x86.1.0.0-rc1-final)

    其实这个错误很容易解决.设置一个startup工程即可.

  9. Error:java: Can‘t generate mapping method with primitive return type.报错

    原因:Spring项目中使用了JPA以及Mybatis–mapper文件注解引错包导致编译错误 解决: 错误:import org.mapstruct.Mapper;正确路径:import org.a ...

随机推荐

  1. How threads differ from processes

    How threads differ from processes Threads differ from traditional multitasking operating system proc ...

  2. Emacs下的中文输入

    Emacs如此优秀的编辑器,如果输入中文不顺畅,不免遗憾.可惜现实是折腾很久也未必用得称心如意,作为一个重度(也许是中毒) Emacs使用者,根据个人经验写下此文,希望对同道中人有所帮助. 在Wind ...

  3. 学习PYTHON之路, DAY 7 - PYTHON 基础 7 (面向对象基础)

    面向对象三大特性 一.封装 封装,顾名思义就是将内容封装到某个地方,以后再去调用被封装在某处的内容. 所以,在使用面向对象的封装特性时,需要: 将内容封装到某处 从某处调用被封装的内容 第一步:将内容 ...

  4. 在Oracle中使用Entity Framework 6 CodeFirst

    项目中需要将系统从SQLServer数据库迁移到Oracle上.由于原大部分数据访问操作都是通过包装了Entity Framework的统一访问入口实现的,所以需要研究Entity Framework ...

  5. gtp转换mbr

    http://wenku.baidu.com/link?url=P_t0U8Q-LIUdxVGHBefipAvbV6fg3jnX8hc8ugaRoo5WWd8GJePO8sBbtLON15gvOZh4 ...

  6. tomcat mysql 内存溢出的问题

    原因是mysql的密码有问题 解决办法: 具体操作步骤: 关闭 mysql: # service mysqld stop 然后: # mysqld_safe --skip-grant-tables 启 ...

  7. Selenium的延迟等待

    http://my.oschina.net/u/928852/blog/98885 Selenium的延迟等待分为 显式等待(Explicit Wait) & 隐式等待(Implicit Wa ...

  8. 网站整体架构去Windows化

    数据层放弃SQL Server数据库和存储过程,全部迁移到Linux平台上的MySQL数据库上: 缓存不再依赖.net自身提供的缓存机制,迁移到部署在Linux平台上的分布式的Redis上: 服务之间 ...

  9. Eclipse里面Outline中图标的含义

    先说颜色:  绿色:public  黄色:protected  蓝色:no modifier  红色:private 再说形状:  实心:method  空心:variable  实心中间有字母C:c ...

  10. ICEM(2)—机翼翼稍网格绘制

    有时我们需要观察翼尖涡,这就需要将机翼全部被网格包围.但是网上比较多的教程都是机翼边缘即为网格边缘,机翼位于网格内部的不多.若是直接将网格拉伸,则会产生结构和非结构网格交错的情况.下面是绘制步骤 1. ...