semantic-link-labs
semantic-link-labs copied to clipboard
setting the theme.json
setting the theme does not work A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
rpt.set_theme(theme_file_path='https://raw.githubusercontent.com/PowerBiDevCamp/FabricUserApiDemo/main/FabricUserApiDemo/DefinitionTemplates/Shared/Reports/StaticResources/SharedResources/BaseThemes/CY23SU08.json')
File /nfs4/pyenv-173d0a0c-8419-4280-97d5-5c8c86827a79/lib/python3.11/site-packages/sempy_labs/report/_reportwrapper.py:1485, in ReportWrapper.set_theme(self, theme_file_path) 1482 rptJson["themeCollection"]["customTheme"]["name"] = theme_name_full 1483 rptJson["themeCollection"]["customTheme"]["type"] = resource_type -> 1485 for package in rptJson["resourcePackages"]: 1486 package["items"] = [ 1487 item 1488 for item in package["items"] 1489 if item["type"] != "CustomTheme" 1490 ] 1492 if not any( 1493 package["name"] == resource_type 1494 for package in rptJson["resourcePackages"] 1495 ):
KeyError: 'resourcePackages'
Thanks for raising this. I'm working on an overhaul of the ReportWrapper which will fix this issue.