You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there! Thanks for creating this module, super helpful!
Today, though, there's been an issue when attempting to access the Chat Webpaths objects for some Chats. Basically, there's some chats where the Webpath list consists of a ProxyList rather than the usual Webpath object, which makes impossible to extract the different fields as used to:
>>> chat.webpath
[[1639008082, 'https://www.test.com', 'https://www.test.com', 'Test Title']]
>>> chat2.webpath
[Webpath(), Webpath()]
>>> [{'chat_id': chat.id, 'title': webpath.title} for webpath in chat.webpath]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <listcomp>
AttributeError: 'ProxyList' object has no attribute 'title'
>>> [{'chat_id': chat.id, 'title': webpath.title} for webpath in chat2.webpath]
[{'chat_id': '12345', 'title': 'Test Title'}, {'chat_id': '67890', 'title': 'Test Title'}]
I've applied a workaround to process these cases, assuming that the fields in the ProxyList always come in the same format:
But thought it was worth sharing with you folks so a proper fix can be applied here, since the patch is quite hacky and I'd be expecting Webpath objects there, which seems to be something wrong when building the object on Zenpy side.
Best regards,
Víctor
The text was updated successfully, but these errors were encountered:
Hi there! Thanks for creating this module, super helpful!
Today, though, there's been an issue when attempting to access the Chat Webpaths objects for some Chats. Basically, there's some chats where the Webpath list consists of a ProxyList rather than the usual Webpath object, which makes impossible to extract the different fields as used to:
I've applied a workaround to process these cases, assuming that the fields in the ProxyList always come in the same format:
But thought it was worth sharing with you folks so a proper fix can be applied here, since the patch is quite hacky and I'd be expecting Webpath objects there, which seems to be something wrong when building the object on Zenpy side.
Best regards,
Víctor
The text was updated successfully, but these errors were encountered: