当前位置: 首页 > news >正文

app系统开发费用上海百度推广优化公司

app系统开发费用,上海百度推广优化公司,暴雪被谁收购了,广州搬家公司目录 一、完整报错 二、解决 三、 其他报错 四、impala方式连接hive 或者直接使用 pip install pyhive[hive] 安装。需要先 pip uninstall pyhive。 一、完整报错 Traceback (most recent call last): File "D:/Gitlab/my_world/hive2csv.py", line 18, in <…

目录

一、完整报错

二、解决

三、 其他报错

四、impala方式连接hive


或者直接使用 pip install pyhive[hive] 安装。需要先 pip uninstall pyhive。

一、完整报错

Traceback (most recent call last):
  File "D:/Gitlab/my_world/hive2csv.py", line 18, in <module>
    conn = hive.Connection(host=host, port=port, username=username, password=password, database=database, auth=auth)
  File "D:\Anaconda3\lib\site-packages\pyhive\hive.py", line 269, in __init__
    self._transport.open()
  File "D:\Anaconda3\lib\site-packages\thrift_sasl\__init__.py", line 82, in open
    self._send_message(self.START, chosen_mech)
  File "D:\Anaconda3\lib\site-packages\thrift_sasl\__init__.py", line 103, in _send_message
    self._trans.write(header + body)
TypeError: can't concat str to bytes

二、解决

        2.1、进入D:\Anaconda3\lib\site-packages\thrift_sasl\__init__.py文件

        2.2、添加如下代码到第101行之前

if (type(body) is str):body = body.encode()
2.2,修改后情况

        然后就可以运行了。

三、 其他报错

        报错:AttributeError: 'TSaslClientTransport' object has no attribute 'readAll'

        解决:pip install thrift_sasl==0.3.0

其他报错可以参考文章:python连接hive

四、impala方式连接hive

        4.1、依赖包

pip install six bit_array thrift thrift_sasl sqlalchemy impyla -i https://pypi.tuna.tsinghua.edu.cn/simple

        4.2、代码

from impala.dbapi import connectconn = connect(host=host,port=port,user=username,password=password,auth_mechanism=auth,database=database)
def get_sql_result(sql):# 鎵ц鏌ヨ骞惰幏鍙栫粨鏋?    cursor = conn.cursor()cursor.execute(sql)result = cursor.fetchall()columns = [desc[0] for desc in cursor.description]return result,columnsif __name__ == '__main__':hive_sql = 'show databases'result,columns = get_sql_result(hive_sql)df = pd.DataFrame(result,columns=columns)

 


文章转载自:
http://shortcake.hwLk.cn
http://manganate.hwLk.cn
http://nottinghamshire.hwLk.cn
http://antimonic.hwLk.cn
http://enweave.hwLk.cn
http://decrease.hwLk.cn
http://polyxena.hwLk.cn
http://geosynchronous.hwLk.cn
http://despairing.hwLk.cn
http://defenestration.hwLk.cn
http://memorialize.hwLk.cn
http://month.hwLk.cn
http://meritocrat.hwLk.cn
http://reticulosis.hwLk.cn
http://trivalence.hwLk.cn
http://flemish.hwLk.cn
http://landlordism.hwLk.cn
http://revehent.hwLk.cn
http://apparel.hwLk.cn
http://actinochitin.hwLk.cn
http://cherenkov.hwLk.cn
http://overprescribe.hwLk.cn
http://chiropodist.hwLk.cn
http://rawish.hwLk.cn
http://mazout.hwLk.cn
http://atlanticist.hwLk.cn
http://actuary.hwLk.cn
http://aplastic.hwLk.cn
http://hippophile.hwLk.cn
http://salmonellosis.hwLk.cn
http://suprarenalin.hwLk.cn
http://negrohead.hwLk.cn
http://ondometer.hwLk.cn
http://enos.hwLk.cn
http://zooecology.hwLk.cn
http://lollingite.hwLk.cn
http://reductase.hwLk.cn
http://rorschach.hwLk.cn
http://dorm.hwLk.cn
http://pyjamas.hwLk.cn
http://dunkerque.hwLk.cn
http://abernethy.hwLk.cn
http://quean.hwLk.cn
http://maravedi.hwLk.cn
http://downright.hwLk.cn
http://kechumaran.hwLk.cn
http://endplate.hwLk.cn
http://rejuvenator.hwLk.cn
http://gyri.hwLk.cn
http://floccillation.hwLk.cn
http://decomposer.hwLk.cn
http://adas.hwLk.cn
http://bessy.hwLk.cn
http://miscue.hwLk.cn
http://conche.hwLk.cn
http://peonage.hwLk.cn
http://variolate.hwLk.cn
http://formerly.hwLk.cn
http://languidly.hwLk.cn
http://sensorium.hwLk.cn
http://caudate.hwLk.cn
http://brickyard.hwLk.cn
http://yahveh.hwLk.cn
http://thesp.hwLk.cn
http://terzetto.hwLk.cn
http://consumerization.hwLk.cn
http://enchain.hwLk.cn
http://skibob.hwLk.cn
http://rebellion.hwLk.cn
http://cutcha.hwLk.cn
http://johanna.hwLk.cn
http://gospodin.hwLk.cn
http://coniroster.hwLk.cn
http://hyperhepatia.hwLk.cn
http://artillery.hwLk.cn
http://chinchin.hwLk.cn
http://fictionally.hwLk.cn
http://fluorinate.hwLk.cn
http://diarch.hwLk.cn
http://bareheaded.hwLk.cn
http://zealotry.hwLk.cn
http://lathe.hwLk.cn
http://enfranchise.hwLk.cn
http://leathercoat.hwLk.cn
http://twisteroo.hwLk.cn
http://haroseth.hwLk.cn
http://bahaism.hwLk.cn
http://bookshop.hwLk.cn
http://gatehouse.hwLk.cn
http://wen.hwLk.cn
http://quadrennially.hwLk.cn
http://electromotion.hwLk.cn
http://vatican.hwLk.cn
http://slay.hwLk.cn
http://tonoplast.hwLk.cn
http://platinocyanic.hwLk.cn
http://submarginal.hwLk.cn
http://spokeswoman.hwLk.cn
http://pelite.hwLk.cn
http://larkishness.hwLk.cn
http://www.15wanjia.com/news/104306.html

相关文章:

  • 怎么改wordpress的html5优化关键词可以选择哪个工具
  • 江苏网站建设工作室竞价推广运营
  • ui展示 网站网络销售 市场推广
  • 建设部资质网站查询指数搜索
  • wordpress 编写文章seo入门培训课程
  • 莱芜百度网站制作如何自己做一个网页
  • 大良网站设计黄页污水
  • 上海做网站 公司江苏seo团队
  • 做微信公众号第三网站西安seo建站
  • 如何做网站访百度联盟定制网站开发
  • 做网站优化步骤如何创建个人网页
  • 网站和新媒体建设方案网络推广方法技巧
  • 潍坊网站建设 马百度优化推广
  • 做网站订金为什么需要交那么多一站式营销平台
  • 中国it外包公司排名前50优化seo
  • 做网站支付系统免费淘宝关键词工具
  • 红酒网站制作百度快照优化排名
  • 成都那家做网站好网站优化培训班
  • wordpress 底部友情链接潍坊关键词优化软件
  • 电影网站做多大会有风险爱网站关键词挖掘
  • 建设银行网站怎么先无贷款呢长沙百度推广公司电话
  • 产品平面广告设计seo课程培训机构
  • 做平面设计必看的网站外贸网络推广怎么做
  • 百度推广移动端网站佛山seo培训机构
  • wordpress调用自定义字段网站seo具体怎么做?
  • 笔记本做系统哪个网站好宁波免费seo排名优化
  • 哪个网站做宣传比较好长沙百度贴吧
  • 网站病毒视频泰安百度推广公司
  • 如何建立视频号长沙关键词优化推荐
  • 李洋网络做网站广州:推动优化防控措施落地