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

Issue with getAttachments() function #202

Open
SureshRIS opened this issue Mar 4, 2024 · 1 comment
Open

Issue with getAttachments() function #202

SureshRIS opened this issue Mar 4, 2024 · 1 comment

Comments

@SureshRIS
Copy link

Hello,

When using RTCClient, only for certain WorkItems, it is unable to fetch the attachments and it ends up with an error like below:

File "C:\1_Work\Tool\pyFile\main.py", line 10, in check_dou_tag
attachments = str(item.getAttachments())
File "C:\1_Work\Tool\pyFile\rtcclient_v2\workitem.py", line 919, in getAttachments
page_size="10"))
File "C:\1_Work\Tool\pyFile\rtcclient_v2\client.py", line 1428, in _get_paged_resources
filter_rule=filter_rule)
File "C:\1_Work\Tool\pyFile\rtcclient_v2\client.py", line 1497, in _handle_resource_entry
entry_archived = entry.get("rtc_cm:archived")
AttributeError: 'str' object has no attribute 'get'

But for many other WorkItems, the same code works.
Could you help here?

@SureshRIS
Copy link
Author

i also reffered issue #160 and i changed the following in client.py
if isinstance(entries, OrderedDict):
to
if isinstance(entries, dict):

it works then, but i tried the xmltodict downgrading to 0.12.0 but this makes my complete application very slow, so i switched back to 0.13.0

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

1 participant