Closed nicolasbisurgi closed 6 months ago
This should be resolved with #1091
@nicolasbisurgi can you confirm that the issue is resolved after you upgrade?
pip uninstall tm1py
pip install https://github.com/cubewise-code/tm1py/archive/refs/heads/1078-allow-file-io-to-subfolders.zip
Below is an example that works on my end:
from io import BytesIO
from TM1py import TM1Service
tm1params = {
"base_url": "https://us-east-1.planninganalytics.saas.ibm.com/api/6OGIVKE6499L/v0/tm1/Marius/",
"user": "apikey",
"password": "ABCD",
"async_requests_mode": True
}
with TM1Service(**tm1params) as tm1:
tm1.files.create(
file_name="folderA/folderB/file.csv",
file_content=BytesIO("text".encode('utf-8')))
Describe the bug Enhancement: Currently we can only write files to the root folder of the content store. The existing functions do not parse '/' or '\' to reach to subdirectories: "source_files/data/plan_Control.csv" should be transformed to: Contents('Files')/Contents('source_files')/Contents('data')/Contents('plan_Control.csv')/Content?
Version TM1py 2.0.2 TM1 Server Version: 11 and 12 where content store endpoint exists
Additional context Add any other context about the problem here.