Gym-Trading-Env
Gym-Trading-Env copied to clipboard
The renderer is not working in my system
First of all thank you for this amazing environment. I am using Anaconda and Spyder. I am facing the following problem.
Next I tried
It works to run the code with no error. But in the browser I find no graph
I suggest you to downgrade your gymnasium version to the one I used when I created the env
I have done it. I have downgraded the gymnasium version to 0.28.1. The user warning error is not coming any more. how ever the web page is still showing blank.
Following error I am getting in spyder
I have done it. I have downgraded the gymnasium version to 0.28.1. The user warning error is not coming any more. how ever the web page is still showing blank. Following error I am getting in spyder
Your dataframe index obviously isn't a Timestamp index.
No my data frame index is in timestamps cause I am getting the result like market return portfolio return. Only the renderer is not working.
No my data frame index is in timestamps cause I am getting the result like market return portfolio return. Only the renderer is not working.
I tried the renderer yesterday and it works! You have to debug it by yourself, what @ClementPerroud is calling there is this function: https://pandas.pydata.org/docs/reference/api/pandas.Timestamp.strftime.html#pandas.Timestamp.strftime So if your dataframe has a timestamp index it would be definitely available.
@RitwikGhoshLives I ran into the same issue, I think it depends what kind of Index pandas creates. I replaced the line with:
df['date_str'] = [d.strftime("%Y-%m-%d %H:%M") for d in df.index]
This way it works always.