(Solved) WARNING:root:could not open file '/etc/apt/sources.list'

Message
Author
User avatar
Moltke
Posts: 229
Joined: Tue Dec 19, 2017 6:07 pm

(Solved) WARNING:root:could not open file '/etc/apt/sources.list'

#1 Post by Moltke »

Hi everyone! Hope you're all having a nice life! :happy:
I was trying to add the ppa for sayonara player and got this error: WARNING:root:could not open file '/etc/apt/sources.list' I googled and found some post offering solutions but none of them worked. The complete error message is this:

Code: Select all

WARNING:root:could not open file '/etc/apt/sources.list'

WARNING:root:could not open file '/etc/apt/sources.list'

Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for MX/Continuum
I tried removing and reinstalling software-properties-common but that did nothing. I also open in featherpad /usr/bin/apt-add-repository, SoftwareProperties.py and distro.py, looked for the errors as per the message but I guess it was to much for my already limited skills :p . System's working fine, upgrades work fine, it only seems to affect this. Any help is much appreciated. Thanks in advance for your help.
Last edited by Moltke on Fri Feb 01, 2019 9:49 am, edited 1 time in total.
Without each other's help there ain't no hope for us :happy:

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#2 Post by fehlix »

Moltke wrote: Fri Feb 01, 2019 8:23 am

Code: Select all

WARNING:root:could not open file '/etc/apt/sources.list'
Just create an "empty" sources.list file as such

Code: Select all

echo "# dummy source-list entry" | sudo tee -a /etc/apt/sources.list
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Moltke
Posts: 229
Joined: Tue Dec 19, 2017 6:07 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#3 Post by Moltke »

fehlix wrote: Fri Feb 01, 2019 8:37 am
Moltke wrote: Fri Feb 01, 2019 8:23 am

Code: Select all

WARNING:root:could not open file '/etc/apt/sources.list'
Just create an "empty" sources.list file as such

Code: Select all

echo "# dummy source-list entry" | sudo tee -a /etc/apt/sources.list
:puppy:
Thank you, that got rid of the Warning message but still got some errors:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for MX/Continuum
Without each other's help there ain't no hope for us :happy:

User avatar
baldyeti
Posts: 678
Joined: Sat Dec 05, 2009 4:37 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#4 Post by baldyeti »

PPA's are for ubuntu so its no wonder the python script knows noting about debian nor MX/Continuum.
Do not use ppa's on debian, file a porting request in the MX forum if you really need the SW.

User avatar
Moltke
Posts: 229
Joined: Tue Dec 19, 2017 6:07 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#5 Post by Moltke »

baldyeti wrote: Fri Feb 01, 2019 9:05 am PPA's are for ubuntu so its no wonder the script knows noting about debian nor MX/Continuum.
[url=viewtopic.php?f=104&t=44747]Do not use ppa's on debian[url], file a porting request in the MX forum if you really need the SW.
Thanks for your answer. I know PPAs are for Ubuntu, however, I added a few in the past with no errors whatsoever in MX-17. I also know about people advicing not to add ppas on Debian, but like I said, I've done it before and it worked but now in MX-18, it doesn't.
Without each other's help there ain't no hope for us :happy:

User avatar
richb
Administrator
Posts: 10323
Joined: Wed Jul 12, 2006 2:17 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#6 Post by richb »

Some ppa's will work and others will not. Nothing to do whether it is MX 17 or MX 18. The best approach is to ask the packagers in the Package request forum to package it for MX.
Forum Rules
Guide - How to Ask for Help

richb Administrator
System: MX 23 KDE
AMD A8 7600 FM2+ CPU R7 Graphics, 16 GIG Mem. Three Samsung EVO SSD's 250 GB

User avatar
dolphin_oracle
Developer
Posts: 19926
Joined: Sun Dec 16, 2007 1:17 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#7 Post by dolphin_oracle »

Moltke wrote: Fri Feb 01, 2019 9:10 am
baldyeti wrote: Fri Feb 01, 2019 9:05 am PPA's are for ubuntu so its no wonder the script knows noting about debian nor MX/Continuum.
[url=viewtopic.php?f=104&t=44747]Do not use ppa's on debian[url], file a porting request in the MX forum if you really need the SW.
Thanks for your answer. I know PPAs are for Ubuntu, however, I added a few in the past with no errors whatsoever in MX-17. I also know about people advicing not to add ppas on Debian, but like I said, I've done it before and it worked but now in MX-18, it doesn't.
there has been no change to the apt backend in mx18 vs. mx17. they are identical. that said, did making the /etc/apt/sources.list file work? this file does not exist in MX by default (and never has), but it should be OK to make. they are just simple text files.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#8 Post by fehlix »

Moltke wrote: Fri Feb 01, 2019 9:00 am .. but still got some errors:
I have no expiriences with adding 3rd party ppa's. And I would not recommend to do so,
as this has shown to create a lot's of issue, which might show up later. In addtion thos PPA's are
mostly ubunto related, and are know to bring debian systems into unstable state.
Recommended way would be to file a package request for such an app instead of manually adding 3rdt party repos.
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
baldyeti
Posts: 678
Joined: Sat Dec 05, 2009 4:37 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#9 Post by baldyeti »

The 2nd error is not about the missing file anymore, but MX being unsupported :

aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for MX/Continuum

User avatar
Moltke
Posts: 229
Joined: Tue Dec 19, 2017 6:07 pm

Re: WARNING:root:could not open file '/etc/apt/sources.list'

#10 Post by Moltke »

Thank you people for all your answers. I found this post in the forum http://forum.mxlinux.org/viewtopic.php?t=42954 plus some more reading on the web and came to realize that jus as richb said
Some ppa's will work and others will not. Nothing to do whether it is MX 17 or MX 18.
Also, this words from dolphin_oracle
there has been no change to the apt backend in mx18 vs. mx17. they are identical.
made it a little clearer to me
did making the /etc/apt/sources.list file work? this file does not exist in MX by default (and never has), but it should be OK to make. they are just simple text files.
Yes and no. No more "Warning:root..." message but still won't work. I'm goona try a .deb file from here http://ppa.launchpad.net/lucioc/sayonar ... /sayonara/ and see it that works. I only wanted to try it, I use clementine and am happy with it but I just read about sayonara and thought of give it a try but it's not like I "need" that package, I'm totally fine with clementine as my music player, I just want to explore some other alternative to see whether there's some edge over it or not 9_9 So far, not being able to install it in MX is a minus.
Without each other's help there ain't no hope for us :happy:

Post Reply

Return to “General”