Giter VIP home page Giter VIP logo

Comments (5)

lem0ke avatar lem0ke commented on September 27, 2024

同样存在该问题,我的报错:
Traceback (most recent call last):
File "D:\test.py", line 33, in
index_fear_greed_funddb_df = ak.index_fear_greed_funddb(symbol="上证指数")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\anaconda3\Lib\site-packages\akshare\index\index_fear_greed_funddb.py", line 56, in index_fear_greed_funddb
mcode = js_code.call("my_decode", data_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\anaconda3\Lib\site-packages\py_mini_racer\py_mini_racer.py", line 271, in call
return self.execute(js, timeout=timeout, max_memory=max_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\anaconda3\Lib\site-packages\py_mini_racer\py_mini_racer.py", line 242, in execute
ret = self.eval(wrapped_expr, timeout=timeout, max_memory=max_memory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\anaconda3\Lib\site-packages\py_mini_racer\py_mini_racer.py", line 228, in eval
return MiniRacerValue(self, res).to_python()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\anaconda3\Lib\site-packages\py_mini_racer\py_mini_racer.py", line 410, in to_python
self._raise_from_error()
File "C:\anaconda3\Lib\site-packages\py_mini_racer\py_mini_racer.py", line 401, in _raise_from_error
raise JSEvalException(msg.decode('utf-8', errors='replace'))
py_mini_racer.py_mini_racer.JSEvalException: Uncaught Error: Malformed UTF-8 data at undefined:479:20
Error: Malformed UTF-8 data
at Object.stringify (:479:27)
at WordArray.init.toString (:216:41)
at my_decode (:6000:22)
at :1:46
at :1:20974

from akshare.

albertandking avatar albertandking commented on September 27, 2024

最新版本V1.13.40,index_fear_greed_funddb()接口报错: _get_file_content_ths()函数中 file_data = f.read()报错: UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 208481: illegal multibyte sequence

已修复,升级到 AKShare 1.13.40 使用

from akshare.

lilaboc avatar lilaboc commented on September 27, 2024

windows下默认编码是gbk, 仍然会报错, 需要把 index_fear_greed_funddb.py 的27行打开文件的时候加上 encoding="utf-8"

from akshare.

lem0ke avatar lem0ke commented on September 27, 2024

windows下默认编码是gbk, 仍然会报错, 需要把 index_fear_greed_funddb.py 的27行打开文件的时候加上 encoding="utf-8"

确实存在该问题,按你说的方法修复后正常。麻烦作者更新一下 @albertandking

from akshare.

albertandking avatar albertandking commented on September 27, 2024

windows下默认编码是gbk, 仍然会报错, 需要把 index_fear_greed_funddb.py 的27行打开文件的时候加上 encoding="utf-8"

确实存在该问题,按你说的方法修复后正常。麻烦作者更新一下 @albertandking

已修复,升级到 AKShare 1.13.42 使用

from akshare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.