Git Product home page Git Product logo

Comments (8)

chenqs71 avatar chenqs71 commented on July 30, 2024 4

add string ',annotations' at the end of line 27 in stockstats.py

from stockstats.

jealous avatar jealous commented on July 30, 2024 2

I think it's a built in package.
https://docs.python.org/3/library/__future__.html

Could you try from __future__ import annotations?

from stockstats.

jealous avatar jealous commented on July 30, 2024

Please try adding from future import annotations at the beginning of the code.

from stockstats.

CYLEE21 avatar CYLEE21 commented on July 30, 2024

It shows the following error

ImportError: cannot import name 'annotations' from 'future'

is future this pacakge? https://pypi.org/project/future/

from stockstats.

wrx1990 avatar wrx1990 commented on July 30, 2024

add string ',annotations' at the end of line 27 in stockstats.py在 stockstats.py 中第 27 行末尾添加字符串 ',annotations'

it,worked.
image
image

from stockstats.

code4passion avatar code4passion commented on July 30, 2024

This doesnt work for me

from future import unicode_literals, annotations
from stockstats import wrap

Traceback (most recent call last):
File "/Users/dshetyo/PycharmProjects/timeseries-predictor/model_trainer.py", line 10, in
from data_util import get_data
File "/Users/dshetyo/PycharmProjects/timeseries-predictor/data_util.py", line 2, in
from stockstats import wrap
File "/Users/dshetyo/anaconda3/envs/timeseries/lib/python3.8/site-packages/stockstats.py", line 94, in
def set_dft_window(name: str, windows: Union[int, tuple[int, ...]]):
TypeError: 'type' object is not subscriptable

from stockstats.

CYLEE21 avatar CYLEE21 commented on July 30, 2024

My original problem has been solved by changing the python version.
This library has specified the recommened python version.
I hope this helps.

from stockstats.

jealous avatar jealous commented on July 30, 2024

What's the python version that has this error?

from stockstats.

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.