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. Web应用安全十大主动安全措施

    这几天有空参加了360主办的第一届互联网安全大会(ISC 2013),除了现场看到FREEBUF现场微博号发的众多妹子之外,也听到了很多有趣的议题,比如TK分享的通过网络运营商缓存服务器偷渡,只需一台 ...

  2. JSON的一些细节

    这篇JSON的随笔只是为了简单地复习一下学习到的JSON的内容.都是一些很基础的东西.如果你不小心看到了这篇文,那就一起复习吧.(。・∀・)ノ JSON不支持JavaScript中的undefined ...

  3. VS2010部署Asp.net程序到本地IIS 7

        部署自己的网站到本地IIS 当你做一个网站,你想要在局域网访问的时候,你就可以部署到自己的IIS中然后他们通过 ip 去访问.下面就是怎么部署Asp.net 的网站怎么到本地IIS 上的. 1 ...

  4. dp 动态规划 hdu 1003 1087

    动态规划就是寻找最优解的过程 最重要的是找到关系式 hdu 1003 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003 题目大意:求最大字序列和, ...

  5. 为Node.js编写组件的几种方式

    本文主要备忘为Node.js编写组件的三种实现:纯js实现.v8 API实现(同步&异步).借助swig框架实现. 关键字:Node.js.C++.v8.swig.异步.回调. 简介 首先介绍 ...

  6. 当 jquery.unobtrusive-ajax.js 遇上Web API

    最近在熟悉Abp框架,其基于DDD领域驱动设计...前段可以绕过mvc直接调用根据app层动态生成的webapi,有点神奇~,Web API之前有简单接触过,WCF的轻量级版,一般用于做一写开发性的服 ...

  7. POJ2774 (后缀数组)

    #include<cstdio> #include<cstring> using namespace std; ],b[]; ],x[],wv[],ws[],h[],rank[ ...

  8. html5之canvas画图基础

    HTML5+CSS3的好处是,你可以编写一个页面分别用于不同的平台,只需要设置不同的css样式就可以了,现在基本主流浏览器都支持全新的HTML5和CSS3,因为它的跨平台开发.因为是原生代码所以它的页 ...

  9. 实验7 BindService模拟通信

    实验报告 课程名称 基于Android平台移动互联网开发 实验日期 2016.4.16 实验项目名称 BindService模拟通信 实验地点 S30010 实验类型 □验证型    √设计型    ...

  10. Windows 通用应用尝试开发 “51单片机汇编”总结

    一.前言 终于完成windows通用应用“51单片机汇编”,半年前开始玩WindowsPhone开发的第一个真正意义上的App(还很多缺点=_=).开发从1月中旬考完试到今天,期间实习了半个月,玩了几 ...