Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

song = taglib.File("/path/to/my/file.mp3") throws NameError: name 'fspath' is not defined #57

Closed
varun-singh-01 opened this issue Mar 26, 2019 · 6 comments

Comments

@varun-singh-01
Copy link

varun-singh-01 commented Mar 26, 2019

I am trying to run basic example in linux environment:
I have installed development headers of pytaglib and also python-dev headers, but after running following lines I get and exception :
import taglib
song = taglib.File("/path/to/my/file.mp3")

Exception:
Traceback (most recent call last):
File "", line 1, in
File "src/taglib.pyx", line 72, in taglib.File.cinit
NameError: name 'fspath' is not defined

@varun-singh-01
Copy link
Author

It turns out when I ran same code with python3 it works. But I was expecting it to work with python2.7
Is there a way where I can do this?

@supermihi
Copy link
Owner

Which version are you using? AFAIK I newer added the fspath call which would fix #40. Maybe you accidentally checked out this fork?

@varun-singh-01
Copy link
Author

I installed pytaglib from standard command for version 1.4.4

@supermihi
Copy link
Owner

Thanks for reporting. Apparently I forgot to regenerate the shipped taglib.cpp before packing the release, such that an uncommited test version of the file is contained in the published file. :-( Will upload a fixed v1.4.5 ASAP!

@supermihi
Copy link
Owner

Please try v1.4.5 just released to PyPI!

@varun-singh-01
Copy link
Author

varun-singh-01 commented Mar 30, 2019

I am trying fresh , while installing the version 1.4.5 it is throwing an error in pip.log. I checked packages libtag1-dev and python-dev are already installed. after that I ran sudo pip install pytaglib

Removing temporary dir /tmp/pip_build_root...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pytaglib
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1230, in prepare_files
req_to_install.run_egg_info()
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 326, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 715, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pytaglib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants