from vsdx import VisioFile,Shape,vsdxfile,PagePosition,Page
with VisioFile('test1.vsdx') as vis:
page1=vis.add_page(name="NewlyAdded")
page1.width=100 # Getting error for this two lines
page1.height=200
page = vis.pages[0]
new_page=vis.copy_page(page,index=PagePosition.AFTER,name="Demo")
new_page.width=100 # Getting error for this two lines also
new_page.height=200
vis.save_vsdx('copy_of_diagram11.vsdx') # save to a new file```
I am getting below error
C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\vsdx\pages.py", line 123, in width
self._pagesheet_xml.find(f'{namespace}Cell[@N="PageWidth"]').attrib['V'] = str(value)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\abc\AppData\Local\Programs\Python\Python312\Lib\site-packages\vsdx\pages.py", line 113, in _pagesheet_xml
ps = self.vis.masters_xml.find(f'{namespace}Master[@ID="{self.page_id}"]/{namespace}PageSheet')
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'find'
@dave-howard Can you please check and solve this bug.
@dave-howard
Hello, below is my code