TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.79k stars 1.78k forks source link

Help, keep looping a future warning when running all strategies on script! #630

Closed shingtat2 closed 2 weeks ago

shingtat2 commented 11 months ago

Hi all,

Anyone can help on my issue?

environment Python 3.10.11 Ta-lib installed

Code: df.ta.strategy(verbose=False, append=True)

Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(*args))

Have tried all ways to disable warnings eg:

# Save the current warning settings
current_warnings = warnings.filters.copy()
# Suppress all warnings
warnings.filterwarnings('ignore')
# Redirect standard output to null
sys.stdout = open(os.devnull, 'w')
# Suppress logging
logger = logging.getLogger()
original_level = logger.getEffectiveLevel()
logger.setLevel(logging.CRITICAL + 1)
# Suppress only FutureWarnings
warnings.simplefilter(action='ignore', category=FutureWarning)
warnings.simplefilter(action='ignore', category=all)
mrjbq7 commented 11 months ago

What is df.ta.strategyOn Dec 28, 2023, at 9:50 AM, shingtat2 @.**> wrote: Hi all, Anyone can help on my issue? environment Python 3.10.11 Ta-lib installed Code: df.ta.strategy(verbose=False, append=True) Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(args)) Have tried all ways to disable warnings eg:

Save the current warning settings

current_warnings = warnings.filters.copy()

Suppress all warnings

warnings.filterwarnings('ignore')

Redirect standard output to null

sys.stdout = open(os.devnull, 'w')

Suppress logging

logger = logging.getLogger() original_level = logger.getEffectiveLevel() logger.setLevel(logging.CRITICAL + 1)

Suppress only FutureWarnings

warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=all)

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

shingtat2 commented 11 months ago

What is df.ta.strategyOn Dec 28, 2023, at 9:50 AM, shingtat2 @.> wrote: Hi all, Anyone can help on my issue? environment Python 3.10.11 Ta-lib installed Code: df.ta.strategy(verbose=False, append=True) Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(args)) Have tried all ways to disable warnings eg: # Save the current warning settings current_warnings = warnings.filters.copy() # Suppress all warnings warnings.filterwarnings('ignore') # Redirect standard output to null sys.stdout = open(os.devnull, 'w') # Suppress logging logger = logging.getLogger() original_level = logger.getEffectiveLevel() logger.setLevel(logging.CRITICAL + 1) # Suppress only FutureWarnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=all) —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: **@.***>

It's "all" strategy by default

mrjbq7 commented 11 months ago

Right but that code doesn’t come from this project, so without knowing what it is; I can’t help.

On Thu, Dec 28, 2023 at 10:04 AM shingtat2 @.***> wrote:

What is df.ta.strategyOn Dec 28, 2023, at 9:50 AM, shingtat2 @.*> wrote: Hi all, Anyone can help on my issue? environment Python 3.10.11 Ta-lib installed Code: df.ta.strategy(verbose=False, append=True) Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(args)) Have tried all ways to disable warnings eg: # Save the current warning settings current_warnings = warnings.filters.copy() # Suppress all warnings warnings.filterwarnings('ignore') # Redirect standard output to null sys.stdout = open(os.devnull, 'w') # Suppress logging logger = logging.getLogger() original_level = logger.getEffectiveLevel() logger.setLevel(logging.CRITICAL + 1) # Suppress only FutureWarnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=all) —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>

It's "all" strategy by default

— Reply to this email directly, view it on GitHub https://github.com/TA-Lib/ta-lib-python/issues/630#issuecomment-1871386783, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5AZWIBP5GXVOETTMUHDYLWYCZAVCNFSM6AAAAABBFX7W2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGM4DMNZYGM . You are receiving this because you commented.Message ID: @.***>

shingtat2 commented 11 months ago

Right but that code doesn’t come from this project, so without knowing what it is; I can’t help. On Thu, Dec 28, 2023 at 10:04 AM shingtat2 @.> wrote: What is df.ta.strategyOn Dec 28, 2023, at 9:50 AM, shingtat2 @*.> wrote: Hi all, Anyone can help on my issue? environment Python 3.10.11 Ta-lib installed Code: df.ta.strategy(verbose=False, append=True) Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(args)) Have tried all ways to disable warnings eg: # Save the current warning settings current_warnings = warnings.filters.copy() # Suppress all warnings warnings.filterwarnings('ignore') # Redirect standard output to null sys.stdout = open(os.devnull, 'w') # Suppress logging logger = logging.getLogger() original_level = logger.getEffectiveLevel() logger.setLevel(logging.CRITICAL + 1) # Suppress only FutureWarnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=all) —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.> It's "all" strategy by default — Reply to this email directly, view it on GitHub <#630 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5AZWIBP5GXVOETTMUHDYLWYCZAVCNFSM6AAAAABBFX7W2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGM4DMNZYGM . You are receiving this because you commented.Message ID: @*.***>

import pandas_ta as ta

I use pandas_ta and it says the all strategy has to install the ta-lib as well. so did I come to the wrong place, should I go to the pandas-ta section?

mrjbq7 commented 11 months ago

It is possible the error is in this project but I haven’t seen that warning before, so perhaps start with them:https://github.com/twopirllc/pandas-taOn Dec 28, 2023, at 10:04 AM, shingtat2 @.***> wrote:

What is df.ta.strategyOn Dec 28, 2023, at 9:50 AM, shingtat2 @.*> wrote: Hi all, Anyone can help on my issue? environment Python 3.10.11 Ta-lib installed Code: df.ta.strategy(verbose=False, append=True) Keep looping below message and stuck forever: C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\multiprocessing\pool.py:48: FutureWarning: Series.getitem treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use ser.iloc[pos] return list(map(args)) Have tried all ways to disable warnings eg: # Save the current warning settings current_warnings = warnings.filters.copy() # Suppress all warnings warnings.filterwarnings('ignore') # Redirect standard output to null sys.stdout = open(os.devnull, 'w') # Suppress logging logger = logging.getLogger() original_level = logger.getEffectiveLevel() logger.setLevel(logging.CRITICAL + 1) # Suppress only FutureWarnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=all) —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>

It's "all" strategy by default

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>