Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • gajim gajim
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Graph
    • Compare revisions
  • Issues 228
    • Issues 228
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 23
    • Merge requests 23
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • gajimgajim
  • gajimgajim
  • Issues
  • #10273

Crash when trying to retrieve VCard from contact without resource(s)

Hello, dear Gajim team. I've encountered an issue when trying to retrieve a VCard from a contact without a XMPP resource (for example, contact connected via transport/gateway to another network):

Versions

  • OS: Linux
  • GTK Version: 3.24.5
  • PyGObject Version: 3.32.0
  • GLib Version : 2.60.4
  • python-nbxmpp Version: 1.0.2
  • Gajim Version: 1.2.91+637ae4b8

Traceback

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gajim/roster_window.py", line 2537, in on_info
    info[contact.jid] = vcard.VcardWindow(contact, account)
  File "/usr/lib/python3/dist-packages/gajim/vcard.py", line 112, in __init__
    self.fill_jabber_page()
  File "/usr/lib/python3/dist-packages/gajim/vcard.py", line 383, in fill_jabber_page
    + str(self.contact.priority)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

I've managed to quick-fix that behavour:

--- /usr/lib/python3/dist-packages/gajim/vcard.py.bak	2020-09-19 21:20:39.789377239 +0300
+++ /usr/lib/python3/dist-packages/gajim/vcard.py	2020-09-19 21:20:40.905394313 +0300
@@ -379,7 +379,7 @@
 
         resources = '%s (%s)' % (self.contact.resource, str(
             self.contact.priority))
-        uf_resources = self.contact.resource + _(' resource with priority ')\
+        uf_resources = str(self.contact.resource) + _(' resource with priority ')\
                 + str(self.contact.priority)
         if not self.contact.status:
             self.contact.status = ''
Edited Sep 19, 2020 by Ghost User
Assignee
Assign to
Time tracking