Hello, for some reason I can't add melpa to my repositories on emacs. When I add it to my package-archives, this error comes up. It comes up with a fresh installation of emacs 24.3.1, and now that I installed it, a fresh installation of emacs 24.5.1
Nothing in the init.el a part from the setq package-archives etc...
the error comes up while in package--read-archive-file("archives/melpa/archive-contents")
I'm on Linux Mint 17.1, and I have the same problem on two different computers.
I couldn't find anything about this error, so sorry if it turns out to be something stupid from my side. I'm not particularly fluent in elisp. I suspect some UTF-8 encoding issue?
A full backtrace would be helpful here. Try starting emacs with --debug-init.
Of course!
Debugger entered--Lisp error: (wrong-type-argument listp ��)
package--read-archive-file("archives/melpa/archive-contents")
package-read-archive-contents("melpa")
package-read-all-archive-contents()
package-initialize()
eval-buffer(#<buffer *load*-541620> nil "/home/giovanni/.emacs.d/elisp/missing-packages" nil t) ; Reading at buffer position 753
load-with-code-conversion("/home/giovanni/.emacs.d/elisp/missing-packages" "/home/giovanni/.emacs.d/elisp/missing-packages" nil nil)
load("missing-packages")
load-library("missing-packages")
eval-buffer(#<buffer *load*> nil "/home/giovanni/.emacs.d/init.el" nil t) ; Reading at buffer position 214
load-with-code-conversion("/home/giovanni/.emacs.d/init.el" "/home/giovanni/.emacs.d/init.el" t t)
load("/home/giovanni/.emacs.d/init" t t)
#[0 "\205\262� \306=\203�\307\310Q\202;� \311=\204�\307\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB\321\202;�\316\322\323\322\211#\210\322=\203a�\324\325\326\307\327Q!\"\323\322\211#\210\322=\203`�\210\203\243�\330!\331\232\203\243�\332!\211\333P\334!\203}�\211\202\210�\334!\203\207�\202\210�\314\262\203\241�\335\"\203\237�\336\337#\210\340\341!\210\266\f?\205\260�\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
command-line()
normal-top-level()
Note that I have the code on packages on a separate file I load in init.el, that is "missing-packages".
Also, emacs loads the stable.melpa.org repository normally.
Thanks!
Looks like you're probably using the wrong code to add melpa to your package archives. It should look like this:
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
I used this form here:
(setq package-archives '(
("elpa" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
But it doesn't really change anything if I go for your solution, this is the new backtrace:
Debugger entered--Lisp error: (wrong-type-argument listp ��)
package--read-archive-file("archives/melpa/archive-contents")
package-read-archive-contents("melpa")
package-read-all-archive-contents()
package-initialize()
eval-buffer(#<buffer *load*-738863> nil "/home/giovanni/.emacs.d/elisp/missing-packages" nil t) ; Reading at buffer position 831
load-with-code-conversion("/home/giovanni/.emacs.d/elisp/missing-packages" "/home/giovanni/.emacs.d/elisp/missing-packages" nil nil)
load("missing-packages")
load-library("missing-packages")
eval-buffer(#<buffer *load*> nil "/home/giovanni/.emacs.d/init.el" nil t) ; Reading at buffer position 214
load-with-code-conversion("/home/giovanni/.emacs.d/init.el" "/home/giovanni/.emacs.d/init.el" t t)
load("/home/giovanni/.emacs.d/init" t t)
#[0 "\205\262� \306=\203�\307\310Q\202;� \311=\204�\307\312Q\202;�\313\307\314\315#\203*�\316\202;�\313\307\314\317#\203:�\320\nB\321\202;�\316\322\323\322\211#\210\322=\203a�\324\325\326\307\327Q!\"\323\322\211#\210\322=\203`�\210\203\243�\330!\331\232\203\243�\332!\211\333P\334!\203}�\211\202\210�\334!\203\207�\202\210�\314\262\203\241�\335\"\203\237�\336\337#\210\340\341!\210\266\f?\205\260�\314\323\342\322\211#)\262\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "`_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "\n\n(fn)"]()
command-line()
normal-top-level()
But if I add melpa-stable this way (or with add-to-list as in your solution):
(setq package-archives '(
("elpa" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa-stable" . "http://stable.melpa.org/packages/")))
then everything is ok and emacs doesn't complain
It looks like bad archive contents. Can you try deleting the ".elpa" or
moving it temporarily to see what happens?
On Fri, Jun 5, 2015 at 07:29 TuringApproved [email protected]
wrote:
I used this form here:
(setq package-archives '(
("elpa" . "http://tromey.com/elpa/")
("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "http://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")
))But it doesn't really change anything if I go for your solution, this is
the new backtrace:Debugger entered--Lisp error: (wrong-type-argument listp ��)
package--read-archive-file("archives/melpa/archive-contents")
package-read-archive-contents("melpa")
package-read-all-archive-contents()
package-initialize()
eval-buffer(#nil "/home/giovanni/.emacs.d/elisp/missing-packages" nil t) ; Reading at buffer position 831 load-with-code-conversion("/home/giovanni/.emacs.d/elisp/missing-packages" "/home/giovanni/.emacs.d/elisp/missing-packages" nil nil)
load("missing-packages")
load-library("missing-packages")
eval-buffer(#nil "/home/giovanni/.emacs.d/init.el" nil t) ; Reading at buffer position 214 load-with-code-conversion("/home/giovanni/.emacs.d/init.el" "/home/giovanni/.emacs.d/init.el" t t)
load("/home/giovanni/.emacs.d/init" t t)
#[0 "�\205\262 \306=\203�\307�\310Q\202; \311=\204�\307�\312Q\202;\313\307\314\315#\203*\316\202;\313\307\314\317#\203:\320nB�\321\202;\316\322�\323�\322\211#\210�\322=\203a\324\325\326\307�\327Q!\"\323�\322\211#\210�\322=\203��\210�\203\243\330�!\331\232\203\243\332�!\211\333P\334�!\203}\211\202\210\334�!\203\207�\202\210\314\262��\203\241\335��\"\203\237\336\337��#\210\340\341!\210��\266�\f?\205\260\314�\323\342\322\211#)\262�\207" [init-file-user system-type delayed-warnings-list user-init-file inhibit-default-init inhibit-startup-screen ms-dos "~" "/_emacs" windows-nt "/.emacs" directory-files nil "^\\.emacs\\(\\.elc?\\)?$" "~/.emacs" "^_emacs\\(\\.elc?\\)?$" (initialization "_emacs' init file is deprecated, please use `.emacs'") "~/_emacs" t load expand-file-name "init" file-name-as-directory "/.emacs.d" file-name-extension "elc" file-name-sans-extension ".el" file-exists-p file-newer-than-file-p message "Warning: %s is newer than %s" sit-for 1 "default"] 7 "nn(fn)"]()
command-line()
normal-top-level()—
Reply to this email directly or view it on GitHub
https://github.com/milkypostman/melpa/issues/2833#issuecomment-109310836
.
That must have been it.
I went inside elpa/archives and deleted the archive-contents. Now everything works fine. I suspect the file got corrupted somehow.
Sorry for making bad use of your time, in hindsight the source of the error was quite clear from the backtrace.
Thanks for the help!
Np we appreciate the report in case it is something on our end. But that
configuration change has been around a long time so unlikely to be a real
issue.
On Fri, Jun 5, 2015 at 08:02 TuringApproved [email protected]
wrote:
That must have been it.
I went inside elpa/archives and deleted the archive-contents. Now
everything works fine. I suspect the file got corrupted somehow.
Sorry for making bad use of your time, in hindsight the source of the
error was quite clear from the backtrace.Thanks for the help!
—
Reply to this email directly or view it on GitHub
https://github.com/milkypostman/melpa/issues/2833#issuecomment-109321211
.
I am not as familiar with emacs plumbing and it took me a while to find the archives folder. To help others in a similar situation like me, it is located here:
C:\Users{your username}\AppData\Roaming.emacs.d\elpa
I am on a windows machine
I searched for non-ASCII characters in archive-contents, and found:
8 matches in 4 lines for "[^[:ascii:]]" in buffer: archive-contents
132: (yatex . [(20170611 1642) nil "Yet Another tex-mode for emacs //野鳥//" tar nil])
5730: ((lua-mode (20130419))) "Minor mode for working on LÖVE projects" single ((:commit . "31c3fc1ecd31f72f0f736014a4ff905eb3742e74")
7166: (emacs (24 4))) "Helm interface for 知乎日报 (http://daily.zhihu.com)" single ((:commit . "be27dcc6be1eb97663b65581a9a5c0fc81cfaba7")
9761: (cl-lib (0 5))) "command not found (\"did you mean…\" feature) in Eshell" single ((:commit . "7cb6ef8e2274d0a50a9e114d412307a6543533d5")
Get the same problem today.
Deleting elpa/archives works for me.
Most helpful comment
Get the same problem today.
Deleting
elpa/archivesworks for me.