-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Help, keep looping a future warning when running all strategies on script! #750
Comments
Hello @shingtat2, This is a known Issue and is described in Issue #181 which is a pinned Issue at the TOP of the Issue list. Kind Regards |
Yes I have read the post and solution to use main and my codes is already in def main(): but the issue still exist. Any other ways or tips to get it working? def main():
freeze_support()
# 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)
warnings.filterwarnings('ignore')
try:
df.ta.strategy(verbose=True, append=True)
except Exception as e:
# Handle any exception that might be raised
print(f"An error occurred: {e}")
# Restore the original warning settings
warnings.filters = current_warnings
print(df)
if __name__ == '__main__':
main() |
For one thing, you should be using the development version for many reasons I will not include here. Also, So change: Lastly, I recommend not using multiprocessing because it most cases it is not more performant. |
Hello @shingtat2 I assume by no response that the solution provided was sufficient. Thus I will be closing this issue in a few days. Kind Regards, |
Hi all,
Anyone can help on my issue?
environment
Python 3.10.11
Ta-lib installed
Code:
Keep looping below message and stuck forever:
Have tried all ways to disable warnings eg:
The text was updated successfully, but these errors were encountered: