cuthbertLab / music21

music21 is a Toolkit for Computational Musicology
https://www.music21.org/
Other
2.08k stars 395 forks source link

NotImplementedError: cannot instantiate 'PosixPath' on your system #341

Closed sshlien closed 4 years ago

sshlien commented 5 years ago

while attempting sixEight = corpus.search('6/8') PosixPath.txt

blueCat11 commented 5 years ago

I get the same error. This works: metadata.bundles.MetadataBundle('core')

but then this throws the error: metadata.bundles.MetadataBundle('core').read()

mscuthbert commented 5 years ago

Are you both by chance on windows?

Risottorie commented 5 years ago

Yes, I am on Windows. B, Rie

Zitat von Michael Scott Cuthbert notifications@github.com:

Are you both by chance on windows?

sshlien commented 5 years ago

I got the error on Windows 10 -- Seymour

----- Original Message ----- From: "Michael Scott Cuthbert" notifications@github.com To: "cuthbertLab/music21" music21@noreply.github.com Cc: "seymour shlien" fy733@ncf.ca, "Author" author@noreply.github.com Sent: Friday, January 18, 2019 11:30:18 AM Subject: Re: [cuthbertLab/music21] NotImplementedError: cannot instantiate 'PosixPath' on your system (#341)

Are you both by chance on windows?

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/cuthbertLab/music21/issues/341#issuecomment-455606196

blueCat11 commented 5 years ago

I'm on Windows10.

Lutzifer commented 5 years ago

We are currently trying to rebuild the Cache using http://web.mit.edu/music21/doc/moduleReference/moduleCorpusCorpora.html?highlight=rebuild#music21.corpus.corpora.Corpus.rebuildMetadataCache

Looks to me as if the Posix version is being deserialised and windows dies on that...

cp. mscuthberth et.al. https://groups.google.com/forum/#!msg/music21list/eSPp32seBXY/zeWuzmAkBgAJ

sshlien commented 5 years ago

By the way, I am running Python 3.7.1 on Windows 10.

This could be an issue with newer versions of Python.

Seymour

----- Original Message ----- From: "Wolfgang Lutz" notifications@github.com To: "cuthbertLab" music21@noreply.github.com Cc: "seymour shlien" fy733@ncf.ca, "Author" author@noreply.github.com Sent: Friday, January 18, 2019 2:06:09 PM Subject: Re: [cuthbertLab/music21] NotImplementedError: cannot instantiate 'PosixPath' on your system (#341)

We are currently trying to rebuild the Cache using http://web.mit.edu/music21/doc/moduleReference/moduleCorpusCorpora.html?highlight=rebuild#music21.corpus.corpora.Corpus.rebuildMetadataCache

Looks to me as if the Posix version is being deserialised and windows dies on that...

cp. mscuthberth et.al. https://groups.google.com/forum/#!msg/music21list/eSPp32seBXY/zeWuzmAkBgAJ

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/cuthbertLab/music21/issues/341#issuecomment-455653903

sshlien commented 5 years ago

Hello Myke Cuthbert,

For your information, I am still working on some graphic user interfaces for music21 using tkinter. I have attached my latest program still in progress. Progress is somewhat slow since I am still getting used to Python, object coding, tkinter, and music21. I am also working on Humdrum which is written in C++.

Seymour

blueCat11 commented 5 years ago

We are currently trying to rebuild the Cache using http://web.mit.edu/music21/doc/moduleReference/moduleCorpusCorpora.html?highlight=rebuild#music21.corpus.corpora.Corpus.rebuildMetadataCache

I tried this method as well. First, I deleted core.p.gz file in \music21\corpus_metadataCache folder. Then I used rebuildMetadataCache() . It took over an hour, but now I can use the core-corpus on Windows.

Thanks @Lutzifer !

Lutzifer commented 5 years ago

@mscuthbert Maybe it would be a workaround to include two prebuilt metadata files, one for windows and one for posix systems and use them depending on the OS type?

LLight commented 4 years ago

I am running into the same problem, using Python 3.7 on Windows 10 (see the attached code and error message). When I use the corpus.search function, I am getting the same metadata error related to the PosixPath. corpus_search_err.txt

mscuthbert commented 4 years ago

I think that I've fixed this in #459 -- can someone on Windows test this on the latest git? If so, I'll backport release a new v.5 version as well.

mscuthbert commented 4 years ago

Fixed in #459