kalbhor / MusicRepair

Fixes music metadata and adds album art.
MIT License
596 stars 43 forks source link

[FIXED] Python 3.5: Unable to import albumsearch #15

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hi, I am using Ubuntu Xenial and I installed this software in Python 3.5 using the command: pip3 install musicrepair The installation was successful but the problem is I couldn't get it to work initially.

Log:

Traceback (most recent call last): File "/usr/local/bin/musicrepair", line 7, in from musicrepair.command_line import main File "/usr/local/lib/python3.5/dist-packages/musicrepair/command_line.py", line 8, in import albumsearch ImportError: No module named 'albumsearch'

It kept complaining about unable to import albumsearch. I then tracked the installation location to /usr/local/lib/python3.5/dist-packages/musicrepair/ and edited the command_line.py file in this way:

BEFORE

import albumsearch import improvename

AFTER

from . import albumsearch from . import improvename

The reason behind is (you might already know this) the fact that presence of __init__.py file makes Python treat the directory as a package.

kalbhor commented 7 years ago

Ahh yes, I accidentally forgot to write from . import

I will update it soon. Thanks for pointing this out.

kalbhor commented 7 years ago

I do not currently have access to a laptop, which is why I have set the stable version to a previous version. Will fix things and update it on pypi soon.

anu1097 commented 7 years ago

I faced the same issue of albumsearch module.

I tried to install your module using Git clone option. I tried to run "python3 setup.py" after cloning it. This was the result - usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] or: setup.py --help [cmd1 cmd2 ...] or: setup.py --help-commands or: setup.py cmd --help

error: no commands supplied

I am not sure what commands I am supposed to give.

I am newbie and I am trying to use your project as my first to understand open-source way of coding. I always wanted to use python to cater my personal needs of these kinds. But I haven't used it to do any kind of cool projects, just used it for academic purposes. So I am going through various beginner friendly projects so I can understand how other advanced coders code and in the way trying to learn about new modules.

Right now I am trying to understand your scripts, going through the modules used(Requests, six etc.) and understanding various functions. Any suggestions or tips are much appreciated so I can speed up my process.

kalbhor commented 7 years ago

I have updated the setup.py file and uploaded it on PyPI. This error shouldn't persist anymore. use pip install musicrepair -U to upgrade musicrepair.

@anu1097 I'd be happy to clear any queries of yours. I would prefer if we kept the issues column clean. You can message me on facebook to help you through the basics.

anu1097 commented 7 years ago

Thanks, actually I was hesitating to post anything here for the same reason, but couldn't find any other means on Github to contact you or seek help from anyone else. That's why I posted here. Thanks for being considerate will only ping you with valid queries if not able to solve it via Google.