groakat / AudioTagger

5 stars 2 forks source link

Missing .pyc files #31

Closed ali-fairbrass closed 10 years ago

ali-fairbrass commented 10 years ago

I have just synced the master branch on my laptop, and the GItHub AudioTagger folder is missing all .pyc files.

The last time I used AudioTagger on this computer was when we got it working in my office. At that time I think we were running AudioTagger from this folder: C:\Users\ucfaalf\Anaconda\Lib\site-packages\AudioTagger. This folder contains a few .pyc files including init, audioTagger, classDialog, classDialog_auto, and gui_auto.

Can you advise me on what is a safe way to compile the .pyc files into the GtiHub folder which we now work from.

groakat commented 10 years ago

dont worry about these files. They are automatically generated from the .py files when you run the python scipt

ali-fairbrass commented 10 years ago

Sorry, I should have explained that AudioTagger is not working on my laptop, and I thought the missing pyc files were the reason.

The error message I receive is that the colourMap module can't be recognised:


ImportError Traceback (most recent call last) C:\Users\ucfaalf\Anaconda\lib\site-packages\IPython\utils\py3compat.pyc in execf ile(fname, glob, loc) 195 else: 196 filename = fname --> 197 exec compile(scripttext, filename, 'exec') in glob, loc 198 else: 199 def execfile(fname, *where):

C:\Users\ucfaalf\Documents\GitHub\AudioTagger\AudioTagger\audioTagger.py in <mod ule>() 21 import matplotlib.cm as cm 22 from matplotlib.colors import LinearSegmentedColormap ---> 23 import AudioTagger.colourMap as CM 24 25 # audiofolder = "/home/peter/phd/projects/spectogram/Python/Amalgamated_ Code/Snd_files/"

ImportError: No module named colourMap

groakat commented 10 years ago

(you should open another issue if the reason why stuff does not work changes ;))

Anyway. The problem is likely to be that you installed the audiotagger before you added the colourmap module to the code. The easiest fix would be to do

Pip install github.../master.zip

From our repository (you get the path from the button on the github page). A better fix would be to add the audiotagger directory to your ipython startup file . Do

Ipython locate profile default

Go in that folder and then within that one into "startup". There you need to create a python file (give it any name with a .py ending) with

Import sys
Sys.path.append("folder/to/audioTagger")

On 11 July 2014 20:28:57 GMT+01:00, ali-fairbrass notifications@github.com wrote:

Sorry, I should have explained that AudioTagger is not working on my laptop, and I thought the missing pyc files were the reason.

The error message I receive is that the colourMap module can't be recognised:


ImportError Traceback (most recent call last) C:\Users\ucfaalf\Anaconda\lib\site-packages\IPython\utils\py3compat.pyc in execf ile(fname, glob, loc) 195 else: 196 filename = fname --> 197 exec compile(scripttext, filename, 'exec') in glob, loc 198 else: 199 def execfile(fname, *where):

C:\Users\ucfaalf\Documents\GitHub\AudioTagger\AudioTagger\audioTagger.py in <mod ule>() 21 import matplotlib.cm as cm 22 from matplotlib.colors import LinearSegmentedColormap ---> 23 import AudioTagger.colourMap as CM 24 25 # audiofolder = "/home/peter/phd/projects/spectogram/Python/Amalgamated_ Code/Snd_files/"

ImportError: No module named colourMap


Reply to this email directly or view it on GitHub: https://github.com/groakat/AudioTagger/issues/31#issuecomment-48772746

Sent from my Android device with K-9 Mail. Please excuse my brevity.

ali-fairbrass commented 10 years ago

Ah, yes, sorry Peter!

I will try this and close if it works :)

ali-fairbrass commented 10 years ago

Neither of these solutions worked to get AudioTagger working on my notebook unfortunately.

The first option (pip install https://github.com/groakat/AudioTagger/archive/master.zip) returned this error message:

HTTP error 404 while getting https://github.com/groakat/AudioTagger/archive/ ster.zip Cleaning up... Exception: Traceback (most recent call last): File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip\basecommand.py", line 2, in main status = self.run(options, args) File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip\commands\install.py", ne 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bun e=self.bundle) File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip\req.py", line 1197, in repare_files do_download, File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip\req.py", line 1375, in npack_url self.session, File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip\download.py", line 547 in unpack_http_url resp.raise_for_status() File "C:\Users\ucfaalf\Anaconda\lib\site-packages\pip_vendor\requests\model py", line 795, in raise_for_status raise HTTPError(http_error_msg, response=self) HTTPError: 404 Client Error: Not Found

Storing debug log for failure in C:\Users\ucfaalf\pip\pip.log

The second option was not necessary, as I already have a python file in the ipython default startup folder called include_audioTagger.py which contains the text:

import sys sys.path.append("C:/Users/ucfaalf/Documents/GitHub/AudioTagger/AudioTagger/")

I am still recieving the same error message about not being able to find the colourMap module.

Any suggestions?

groakat commented 10 years ago

But you have the colourMap file in your AudioTagger folder, right?

In the ipython startup folder you have to add:

import sys
sys.path.append("C:/Users/ucfaalf/Documents/GitHub/AudioTagger/")