{"id":701,"date":"2020-08-14T16:09:11","date_gmt":"2020-08-14T16:09:11","guid":{"rendered":"http:\/\/labiol.xyz\/?p=701"},"modified":"2020-08-14T16:11:13","modified_gmt":"2020-08-14T16:11:13","slug":"valueerror-invalid-literal-for-int-with-base-10-server-w-ubuntu-desktop","status":"publish","type":"post","link":"https:\/\/www.labiol.xyz\/index.php\/2020\/08\/14\/valueerror-invalid-literal-for-int-with-base-10-server-w-ubuntu-desktop\/","title":{"rendered":"ValueError: invalid literal for int() with base 10: &#8216;server&#8217; w ubuntu desktop."},"content":{"rendered":"\n<p>Je\u015bli u\u017cywasz ubuntu z w\u0142asno\u015bciowymi sterownikami nvidia to mo\u017cliwe \u017ce otrzymasz komunikat:<\/p>\n\n\n\n<p><code>ValueError: invalid literal for int() with base 10: 'server'<\/code><\/p>\n\n\n\n<p>B\u0142\u0105d ten jest zwi\u0105zany z b\u0142\u0119dnym wpisem w pliku :<\/p>\n\n\n\n<p><code>\/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/nvidiadetector.py<\/code><br><\/p>\n\n\n\n<p>Aby naprawi\u0107 powy\u017cszy b\u0142\u0105d, utw\u00f3rz plik <code>patchnw.patch<\/code> najlepiej w katalogu: <code>\/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/<\/code> i dalej wklej do niego poni\u017csz\u0105 zawarto\u015b\u0107:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>--- nvidiadetector.py   2020-08-09 15:54:01.089855652 +0400\n+++ \/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/nvidiadetector.py 2020-08-09 16:26:15.321390371 +0400\n@@ -160,6 +160,8 @@\n             # package names can be like \"nvidia-173:i386\" and we need to\n             # extract the driver flavour from the name e.g. \"173\"\n             stripped_package_name = package.name.split('-')&#91;-1].split(':', 1)&#91;0]\n+            if not stripped_package_name.isnumeric():\n+                stripped_package_name = package.name.split('-')&#91;-2].split('-', -1)&#91;0]\n             driver_version = self.__get_value_from_name(stripped_package_name)\n \n             try:<\/code><\/pre>\n\n\n\n<p>Nast\u0119pnie w katalogu <code>\/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/<\/code> wydaj polecenie:<br><code>patch -u nvidiadetector.py -i patchnw<\/code>.patch<\/p>\n\n\n\n<p>Przetestuj polecneie nvidia-detector, powinno zwr\u00f3ci\u0107 poprawn\u0105 warto\u015b\u0107 dla pakietu &#8220;nvidia-driver&#8221;.<\/p>\n\n\n\n<p>\u017br\u00f3d\u0142o:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/askubuntu.com\/questions\/1258885\/i-have-valueerror-invalid-literal-for-int-with-base-10-server-when-i-enter\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/askubuntu.com\/questions\/1258885\/i-have-valueerror-invalid-literal-for-int-with-base-10-server-when-i-enter<\/a><\/li><li><a href=\"https:\/\/www.howtogeek.com\/415442\/how-to-apply-a-patch-to-a-file-and-create-patches-in-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.howtogeek.com\/415442\/how-to-apply-a-patch-to-a-file-and-create-patches-in-linux\/<\/a><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Je\u015bli u\u017cywasz ubuntu z w\u0142asno\u015bciowymi sterownikami nvidia to mo\u017cliwe \u017ce otrzymasz komunikat: ValueError: invalid literal for int() with base 10: &#8216;server&#8217; B\u0142\u0105d ten jest zwi\u0105zany z b\u0142\u0119dnym wpisem w pliku : \/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/nvidiadetector.py Aby naprawi\u0107 powy\u017cszy b\u0142\u0105d, utw\u00f3rz plik patchnw.patch najlepiej w katalogu: \/usr\/lib\/python3\/dist-packages\/NvidiaDetector\/ i dalej wklej do niego poni\u017csz\u0105 zawarto\u015b\u0107: &hellip; <\/p>\n","protected":false},"author":1,"featured_media":503,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[8,21],"class_list":["post-701","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=701"}],"version-history":[{"count":4,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/701\/revisions"}],"predecessor-version":[{"id":706,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/701\/revisions\/706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media\/503"}],"wp:attachment":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}