Skip to content
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

Error, with only import #47

Open
tktpoto opened this issue Apr 1, 2024 · 4 comments
Open

Error, with only import #47

tktpoto opened this issue Apr 1, 2024 · 4 comments

Comments

@tktpoto
Copy link

tktpoto commented Apr 1, 2024

Hello,

I recently discovered this project and was eager to try it out. However, after installing the project using pip, attempting to import it immediately resulted in an error. The error message is as follows:

Traceback (most recent call last):
File "/mnt/c/Users/franc/Documents/GitHub/GCollab_Lstm_Renforcement/test.py", line 1, in
from gym_mtsim import OrderType
File "/home/osdann/.local/lib/python3.10/site-packages/gym_mtsim/init.py", line 13, in
'original_simulator': MtSimulator(symbols_filename=FOREX_DATA_PATH, hedge=True),
File "/home/osdann/.local/lib/python3.10/site-packages/gym_mtsim/simulator/mt_simulator.py", line 42, in init
if not self.load_symbols(symbols_filename):
File "/home/osdann/.local/lib/python3.10/site-packages/gym_mtsim/simulator/mt_simulator.py", line 73, in load_symbols
self.symbols_info, self.symbols_data = pickle.load(file)
File "/home/osdann/.local/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 2728, in new_block
return klass(values, ndim=ndim, placement=placement, refs=refs)
TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)".

I am using WSL 2 and have set up a new Conda environment specifically for this.
So far, I have only installed the latest version of mtsim and bs3.

Could there be an issue on my end ? Any help would be greatly appreciated.

Thank you.

@tktpoto
Copy link
Author

tktpoto commented Apr 1, 2024

Following the suggestion in this issue: "#44", I installed pandas version 1.5, which resolved the initial problem. However, I encountered a new error related to package dependencies:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gym-mtsim 2.0.0 requires pandas>=2.0.3, but you have pandas 1.5.3 which is incompatible.

It seems there's a conflict between the version of pandas recommended in the issue and the version required by gym-mtsim 2.0.0.
(But in the end, I force the download and it worked)

@AminHP
Copy link
Owner

AminHP commented Apr 1, 2024

Hi @tktpoto , could you try installing pandas==2.0.3 please? It should probably work without raising the second error.

@samarthshrivas
Copy link

Hi @tktpoto , could you try installing pandas==2.0.3 please? It should probably work without raising the second error.

It worked !!!. Thanks.
Maybe you should include this in requirements.txt

@worthy7
Copy link

worthy7 commented Nov 9, 2024

Can you upgrade this to support latest version of python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants