GithubHelp home page GithubHelp logo

Testing code failed about speech_dtw HOT 7 CLOSED

kamperh avatar kamperh commented on August 20, 2024
Testing code failed

from speech_dtw.

Comments (7)

kamperh avatar kamperh commented on August 20, 2024

Hey @elenazy,

Did you run the make command before, and did that complete successfully?

Cheers

from speech_dtw.

elenazy avatar elenazy commented on August 20, 2024

Hi,
May be I failed in make command .Below is detail:
(kws-zy) cad-1@cad1-SYS-7048GR-TR:~/zhangying/speech_dtw$ **make** python setup.py build_ext --inplace running build_ext skipping 'speech_dtw/_dtw.c' Cython extension (up-to-date)
Last time I installed Cython=0.26 to match up Python3.6 on Ubuntu,so is it a Cython version problem?
I really need your help.

Hey @elenazy,

Did you run the make command before, and did that complete successfully?

Cheers

from speech_dtw.

kamperh avatar kamperh commented on August 20, 2024

Try to quickly run make clean and then run make again, just to make sure it actually compiles. Then check if there is actually a speech_dtw/_dtw.c file afterwards. It might be a Cython issue, and these steps will tell you if that's the problem.

from speech_dtw.

elenazy avatar elenazy commented on August 20, 2024

Hi,
I followed your advice and then speech_dtw/_dtw.c file indeed exists.
(kws-zy) cad-1@cad1-SYS-7048GR-TR:~/zhangying/speech_dtw/speech_dtw$ ls _dtw.c _dtw.pyx __pycache__ tests _dtw.cpython-36m-x86_64-linux-gnu.so __init__.py qbe.py
But after run make test command ,I still face the same error detail:
`(kws-zy) cad-1@cad1-SYS-7048GR-TR:~/zhangying/speech_dtw$ make test
nosetests -v
Failure: ImportError (cannot import name '_dtw' from 'speech_dtw' (/home/cad-1/zhangying/speech_dtw/speech_dtw/init.py)) ... ERROR
Failure: ImportError (cannot import name '_dtw' from 'speech_dtw' (/home/cad-1/zhangying/speech_dtw/speech_dtw/init.py)) ... ERROR

======================================================================
ERROR: Failure: ImportError (cannot import name '_dtw' from 'speech_dtw' (/home/cad-1/zhangying/speech_dtw/speech_dtw/init.py))

Traceback (most recent call last):
File "/home/cad-1/anaconda3/lib/python3.7/site-packages/nose/failure.py", line 39, in runTest
raise self.exc_val.with_traceback(self.tb)
File "/home/cad-1/anaconda3/lib/python3.7/site-packages/nose/loader.py", line 417, in loadTestsFromName
addr.filename, addr.module)
File "/home/cad-1/anaconda3/lib/python3.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/home/cad-1/anaconda3/lib/python3.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/home/cad-1/anaconda3/lib/python3.7/imp.py", line 234, in load_module
return load_source(name, filename, file)
File "/home/cad-1/anaconda3/lib/python3.7/imp.py", line 171, in load_source
module = _load(spec)
File "", line 696, in _load
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/cad-1/zhangying/speech_dtw/speech_dtw/tests/test_dtw.py", line 10, in
from speech_dtw import _dtw
ImportError: cannot import name '_dtw' from 'speech_dtw' (/home/cad-1/zhangying/speech_dtw/speech_dtw/init.py)
`
So it may actually be Cython version fault,can you tell me your program environment configuration ?

Try to quickly run make clean and then run make again, just to make sure it actually compiles. Then check if there is actually a speech_dtw/_dtw.c file afterwards. It might be a Cython issue, and these steps will tell you if that's the problem.

from speech_dtw.

kamperh avatar kamperh commented on August 20, 2024

Were are you running make test from? And I find the reference to speech_dtw/speech_dtw/init.py a bit weird, think that should be speech_dtw/speech_dtw/__init__.py.

from speech_dtw.

elenazy avatar elenazy commented on August 20, 2024

Hi,
The path to run make test is same as run make:
/home/cad-1/zhangying/speech_dtw
which contains MakeFile, utils, examples...folder.

I made a mistake replying to you and find speech_dtw/speech_dtw/__init__.py is right.Maybe copy's error,and I didnt check carefully.

Were are you running make test from? And I find the reference to speech_dtw/speech_dtw/init.py a bit weird, think that should be speech_dtw/speech_dtw/__init__.py.

from speech_dtw.

jingru-lin avatar jingru-lin commented on August 20, 2024

Hi, I have the same problem. Is it solved?

from speech_dtw.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.