kazam [1.4.5 and 1.5.3] crashed with TypeError in _interpolate_some(): get() got an unexpected keyword argument 'raw'

Bug #1500083 reported by Fabio Marconi
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Kazam Screencaster
Confirmed
Undecided
Unassigned
kazam (Debian)
Fix Released
Unknown
kazam (Ubuntu)
Fix Released
High
Andrew Starr-Bochicchio

Bug Description

**Workaround**
Open the terminal and type :
sudo gedit /usr/lib/python3/dist-packages/kazam/backend/config.py
click the magnifier and in the search box type def get
locate the highlighted def get(self, section, key):
and modify to have:

def get(self, section, key,raw=True,fallback='rest'):
        try:
            return super(KazamConfig,self).get(section, key,raw=raw,fallback=fallback)
            ret = ConfigParser.get(self, section, key)

save and run Kazam

Hallo
Just clicked the icon on the dash and it crash.
No way to run it.
Please fix it soooooon.
Best regards

Traceback (most recent call last):
  File "/usr/bin/kazam", line 146, in <module>
    from kazam.app import KazamApp
  File "/usr/lib/python3/dist-packages/kazam/app.py", line 35, in <module>
    from kazam.backend.prefs import *
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 478, in <module>
    prefs = Prefs()
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 121, in __init__
    self.read_config()
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 199, in read_config
    self.audio_source = int(self.config.get("main", "audio_source"))
  File "/usr/lib/python3/dist-packages/kazam/backend/config.py", line 103, in get
    return ConfigParser.get(self, section, key)
  File "/usr/lib/python3.4/configparser.py", line 772, in get
    d)
  File "/usr/lib/python3.4/configparser.py", line 371, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/lib/python3.4/configparser.py", line 384, in _interpolate_some
    rawval = parser.get(section, option, raw=True, fallback=rest)
TypeError: get() got an unexpected keyword argument 'raw'
njin@ForeverYoung:~$

ProblemType: Crash
DistroRelease: Ubuntu 15.10
Package: kazam 1.4.5-1build1
ProcVersionSignature: Ubuntu 4.2.0-11.13-generic 4.2.1
Uname: Linux 4.2.0-11-generic x86_64
ApportVersion: 2.19-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Sep 26 20:30:17 2015
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/kazam
InstallationDate: Installed on 2015-09-12 (14 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150911)
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/bin/kazam
PythonArgs: ['/usr/bin/kazam']
SourcePackage: kazam
Title: kazam crashed with TypeError in _interpolate_some(): get() got an unexpected keyword argument 'raw'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin netdev plugdev sambashare sudo

Related branches

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :
description: updated
Changed in kazam (Ubuntu):
status: New → Triaged
importance: Undecided → High
information type: Private → Public
description: updated
tags: removed: need-duplicate-check
Changed in kazam (Ubuntu):
importance: High → Critical
description: updated
Changed in kazam (Ubuntu):
importance: Critical → High
Changed in kazam:
status: New → Confirmed
summary: - kazam crashed with TypeError in _interpolate_some(): get() got an
+ kazam 1.4.5 crashed with TypeError in _interpolate_some(): get() got an
unexpected keyword argument 'raw'
summary: - kazam 1.4.5 crashed with TypeError in _interpolate_some(): get() got an
- unexpected keyword argument 'raw'
+ kazam [1.4.5 and 1.5.3] crashed with TypeError in _interpolate_some():
+ get() got an unexpected keyword argument 'raw'
Changed in kazam (Ubuntu):
importance: High → Critical
importance: Critical → High
Revision history for this message
Alan Bell (alanbell) wrote :

this is related to this issue http://bugs.python.org/issue14388
/usr/lib/python3/dist-packages/kazam/backend/config.py extends /usr/lib/python3.4/configparser.py and has a get method, which requires different parameters to the configparser method.

Revision history for this message
Alan Bell (alanbell) wrote :

editing
/usr/lib/python3/dist-packages/kazam/backend/config.py
line 101-103 to read

    def get(self, section, key,raw=True,fallback='rest'):
        try:
            return super(KazamConfig,self).get(section, key,raw=raw,fallback=fallback)

allows it to start. This matches the keyword parameters with configparser and calls the superclass method with the keyword parameters. They should be ignored by whatever calls the KazamConfig get method, but if anything else calls get on the KazamConfig class expecting to get the method from the superclass it will also work.

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Hallo Alan Bell
After editing it now works perfectly.
Many thanks.
Best regards

description: updated
Changed in kazam (Ubuntu):
assignee: nobody → Andrew Starr-Bochicchio (andrewsomething)
Changed in kazam (Debian):
status: Unknown → New
Changed in kazam (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kazam - 1.4.5-2

---------------
kazam (1.4.5-2) unstable; urgency=medium

  * configparser_api_changes.patch: Update for changes
    in ConfigParser api (Closes: #801203, LP: #1500083).
  * debian/control: Bump Standards-Version to 3.9.6

 -- Andrew Starr-Bochicchio <email address hidden> Mon, 12 Oct 2015 21:33:25 -0400

Changed in kazam (Ubuntu):
status: In Progress → Fix Released
Changed in kazam (Debian):
status: New → Fix Released
Revision history for this message
Jonathan Vargas (jvargas-alkaid) wrote :

On Ubuntu 16.04 doesn't work, the workaround seems already applied.

Revision history for this message
Not Happening (darasilverdragon) wrote :

Same - running 16.04 LTE Xenial Xerus, Kazam v.1.5.3, still getting unexpected keyword argument 'raw'

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

After applying patch I got following in Fedora 15:

$ kazam
Traceback (most recent call last):
  File "/usr/bin/kazam", line 147, in <module>
    from kazam.app import KazamApp
  File "/usr/lib/python3.5/site-packages/kazam/app.py", line 36, in <module>
    from kazam.backend.prefs import *
  File "/usr/lib/python3.5/site-packages/kazam/backend/prefs.py", line 587, in <module>
    prefs = Prefs()
  File "/usr/lib/python3.5/site-packages/kazam/backend/prefs.py", line 149, in __init__
    self.read_config()
  File "/usr/lib/python3.5/site-packages/kazam/backend/prefs.py", line 231, in read_config
    self.webcam_source = int(self.config.get("main", "webcam_source"))
ValueError: invalid literal for int() with base 10: 'rest'

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Sorry please ignore comment above, the result after patch on Fedora 25:

$ kazam
/usr/lib/python3.5/site-packages/kazam/frontend/window_area.py:30: PyGIWarning: Wnck was imported without specifying a version first. Use gi.require_version('Wnck', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk, GObject, Gdk, Wnck, GdkX11
/usr/lib/python3.5/site-packages/kazam/backend/gstreamer.py:35: PyGIWarning: Gst was imported without specifying a version first. Use gi.require_version('Gst', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, Gst
/usr/lib/python3.5/site-packages/kazam/frontend/indicator.py:97: PyGIWarning: Keybinder was imported without specifying a version first. Use gi.require_version('Keybinder', '3.0') before import to ensure that the right version gets loaded.
  from gi.repository import Keybinder
Segmentation fault (core dumped)

Revision history for this message
®γσ, ξηg Lιαη Ημ (englianhu) wrote :

[code]
~$ kazam
Traceback (most recent call last):
  File "/usr/bin/kazam", line 149, in <module>
    from kazam.app import KazamApp
  File "/usr/lib/python3/dist-packages/kazam/app.py", line 36, in <module>
    from kazam.backend.prefs import *
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 30, in <module>
    from kazam.backend.webcam import Webcam
  File "/usr/lib/python3/dist-packages/kazam/backend/webcam.py", line 25, in <module>
    gi.require_version('GUdev', '1.0')
  File "/usr/lib/python3/dist-packages/gi/__init__.py", line 129, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace GUdev not available
[/code]

how to fixed the bug?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.