ConfigParser.NoSectionError: No section: 'general' when trying to add a repository

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















When I try to sudo add-apt-repository <any>, I get this error:



Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'


How can I fix this?



Could it have been caused by my switching python to python3?

(Now python --version is Python 3.5.1 and python2 --version is Python 2.7.6)










share|improve this question






















  • Try installing mintsystem which seems to solve many similar cases.

    – Julie Pelletier
    Jan 15 '17 at 3:59











  • apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

    – Bloke
    Jan 15 '17 at 14:04











  • I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

    – Bloke
    Jun 1 '17 at 11:49















2















When I try to sudo add-apt-repository <any>, I get this error:



Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'


How can I fix this?



Could it have been caused by my switching python to python3?

(Now python --version is Python 3.5.1 and python2 --version is Python 2.7.6)










share|improve this question






















  • Try installing mintsystem which seems to solve many similar cases.

    – Julie Pelletier
    Jan 15 '17 at 3:59











  • apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

    – Bloke
    Jan 15 '17 at 14:04











  • I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

    – Bloke
    Jun 1 '17 at 11:49













2












2








2








When I try to sudo add-apt-repository <any>, I get this error:



Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'


How can I fix this?



Could it have been caused by my switching python to python3?

(Now python --version is Python 3.5.1 and python2 --version is Python 2.7.6)










share|improve this question














When I try to sudo add-apt-repository <any>, I get this error:



Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'


How can I fix this?



Could it have been caused by my switching python to python3?

(Now python --version is Python 3.5.1 and python2 --version is Python 2.7.6)







linux-mint apt python ppa






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 15 '17 at 3:44









BlokeBloke

1515




1515












  • Try installing mintsystem which seems to solve many similar cases.

    – Julie Pelletier
    Jan 15 '17 at 3:59











  • apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

    – Bloke
    Jan 15 '17 at 14:04











  • I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

    – Bloke
    Jun 1 '17 at 11:49

















  • Try installing mintsystem which seems to solve many similar cases.

    – Julie Pelletier
    Jan 15 '17 at 3:59











  • apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

    – Bloke
    Jan 15 '17 at 14:04











  • I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

    – Bloke
    Jun 1 '17 at 11:49
















Try installing mintsystem which seems to solve many similar cases.

– Julie Pelletier
Jan 15 '17 at 3:59





Try installing mintsystem which seems to solve many similar cases.

– Julie Pelletier
Jan 15 '17 at 3:59













apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

– Bloke
Jan 15 '17 at 14:04





apt-get install says mintsystem is already the newest version; Tried --reinstall then, which reinstalled successfully (except for "update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match mintsystem Default-Stop values (none)"), and then restarted, but I still get the same error

– Bloke
Jan 15 '17 at 14:04













I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

– Bloke
Jun 1 '17 at 11:49





I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.

– Bloke
Jun 1 '17 at 11:49










2 Answers
2






active

oldest

votes


















0














check your lsb-release file. did you change lsb-release contents? its located on /etc/lsb-release



change content of lsb-release to match your release. something like this:



DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18
DISTRIB_CODENAME=sarah
DISTRIB_DESCRIPTION="Linux Mint 18 sarah"





share|improve this answer























  • Never touched it, seems accurate.

    – Bloke
    Jun 1 '17 at 11:43


















0














Until a better answer comes along, here is the copy of my comment about how I got around this in the end.




I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f337482%2fconfigparser-nosectionerror-no-section-general-when-trying-to-add-a-reposito%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    check your lsb-release file. did you change lsb-release contents? its located on /etc/lsb-release



    change content of lsb-release to match your release. something like this:



    DISTRIB_ID=LinuxMint
    DISTRIB_RELEASE=18
    DISTRIB_CODENAME=sarah
    DISTRIB_DESCRIPTION="Linux Mint 18 sarah"





    share|improve this answer























    • Never touched it, seems accurate.

      – Bloke
      Jun 1 '17 at 11:43















    0














    check your lsb-release file. did you change lsb-release contents? its located on /etc/lsb-release



    change content of lsb-release to match your release. something like this:



    DISTRIB_ID=LinuxMint
    DISTRIB_RELEASE=18
    DISTRIB_CODENAME=sarah
    DISTRIB_DESCRIPTION="Linux Mint 18 sarah"





    share|improve this answer























    • Never touched it, seems accurate.

      – Bloke
      Jun 1 '17 at 11:43













    0












    0








    0







    check your lsb-release file. did you change lsb-release contents? its located on /etc/lsb-release



    change content of lsb-release to match your release. something like this:



    DISTRIB_ID=LinuxMint
    DISTRIB_RELEASE=18
    DISTRIB_CODENAME=sarah
    DISTRIB_DESCRIPTION="Linux Mint 18 sarah"





    share|improve this answer













    check your lsb-release file. did you change lsb-release contents? its located on /etc/lsb-release



    change content of lsb-release to match your release. something like this:



    DISTRIB_ID=LinuxMint
    DISTRIB_RELEASE=18
    DISTRIB_CODENAME=sarah
    DISTRIB_DESCRIPTION="Linux Mint 18 sarah"






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 1 '17 at 7:39









    haw3dhaw3d

    1285




    1285












    • Never touched it, seems accurate.

      – Bloke
      Jun 1 '17 at 11:43

















    • Never touched it, seems accurate.

      – Bloke
      Jun 1 '17 at 11:43
















    Never touched it, seems accurate.

    – Bloke
    Jun 1 '17 at 11:43





    Never touched it, seems accurate.

    – Bloke
    Jun 1 '17 at 11:43













    0














    Until a better answer comes along, here is the copy of my comment about how I got around this in the end.




    I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.






    share|improve this answer



























      0














      Until a better answer comes along, here is the copy of my comment about how I got around this in the end.




      I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.






      share|improve this answer

























        0












        0








        0







        Until a better answer comes along, here is the copy of my comment about how I got around this in the end.




        I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.






        share|improve this answer













        Until a better answer comes along, here is the copy of my comment about how I got around this in the end.




        I ended up setting python back to python2 instead of python3, and everything has been ok since then :/ I might have also reinstalled pyenv. So I'm not sure what exactly caused this nor what exactly fixed it.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 13 '18 at 11:51









        BlokeBloke

        1515




        1515



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f337482%2fconfigparser-nosectionerror-no-section-general-when-trying-to-add-a-reposito%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown






            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay