You are here    Bugs    PlayOnLinux    Bug    Ticket #5692 nl sv ru pl es de fr

Bug #5692 on PlayOnLinux

Cannot open configuration in 4.2.12 on Ubuntu 18.04

Added by m93a on 2018-05-24 12:48:03 - Comment or update this ticket

Assigned to:
Last update:
2018-08-06 22:48:20
Description, steps to reproduce:

I've got PlayOnLinux 4.2.12 on Ubuntu 18.04 Bionic Beaver and when I try to open the configuration menu for a program (the menu's called "Nastavit" in Czech localization), nothing happens. I tried running PlayOnLinux from terminal, this is the message I get after I click on the configuration button:

Traceback (most recent call last):
  File "", line 977, in Configure
    self.configureFrame = configure.MainWindow(self, -1, _("{0} configuration").format(os.environ["APPLICATION_TITLE"]),game_exec.decode("utf-8","replace"),False)
  File "/usr/share/playonlinux/python/", line 729, in __init__
    self.onglets.Packages(_("Install components"))
  File "/usr/share/playonlinux/python/", line 322, in Packages
    for app in self.packageList.getParsedList():
  File "/usr/share/playonlinux/python/", line 53, in getParsedList
    clist = self.getCutList();
  File "/usr/share/playonlinux/python/", line 45, in getCutList
    clist = self.available_packages.split("\n")
AttributeError: 'list' object has no attribute 'split'

I tried installing PlayOnLinux both from Ubuntu reopository and from the PlayOnLinux official deb package but neither one of them worked.


Update by rangertalen on 2018-08-06 22:48:20

This error is caused by the fact that the variable is initiated as an array, but the the contents of a read() are assigned to it as a string of text. If there is nothing to read then this variable contains an array still and you call split() on an array, which fails.

In   /usr/share/playonlinux/python/

   30 class PackageList():
   31     def __init__(self):
   32         self.available_packages = [];
   33         self.loadList();
   35     def loadList(self):
   36         try :
   37             self.available_packages = open(Variables.playonlinux_rep+"/configurations/listes/POL_Functions","r").read()
   38         except IOError as e: # File does not exits ; it will be created when pol is updated
   39             pass
   41     def getList(self):
   42         return self.available_packages;
   44     def getCutList(self):
   45         clist = self.available_packages.split("n")

Line 32 should read:

   32         self.available_packages = '';

That is change = []   to  = ''

Presumably if you have a list of packages installed then this doesn't fail in this way because loadList() succeeds and populates self.available_packages with a text string.