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

Make Test Fails, ImportError: No module named 'base' #4

Open
sairajab opened this issue Jul 12, 2019 · 0 comments
Open

Make Test Fails, ImportError: No module named 'base' #4

sairajab opened this issue Jul 12, 2019 · 0 comments

Comments

@sairajab
Copy link

Hi, I have been trying this repo from almost a week. I was facing make issues before which resolved by using NO_ICONV=1. I removed init.py from srilim-python/srilm directory becuse it was confusing cython. However, my last two tests fail. Can anybody help ?
python3 -m unittest discover -v tests/
test_estimate (test_discount.TestNgramDiscount) ... ok
test_init (test_discount.TestNgramDiscount) ... ok
test_read_write (test_discount.TestNgramDiscount) ... ok
test_maxent (unittest.loader._FailedTest) ... ERROR
test_ngram (unittest.loader._FailedTest) ... ERROR
test_add (test_stats.TestNgramStats) ... ok
test_count (test_stats.TestNgramStats) ... ok
test_count_file (test_stats.TestNgramStats) ... ok
test_count_string (test_stats.TestNgramStats) ... ok
test_get (test_stats.TestNgramStats) ... ok
test_iter (test_stats.TestNgramStats) ... ok
test_len (test_stats.TestNgramStats) ... ok
test_make_test (test_stats.TestNgramStats) ... ok
test_order (test_stats.TestNgramStats) ... ok
test_read_write (test_stats.TestNgramStats) ... ok
test_read_write_binary (test_stats.TestNgramStats) ... ok
test_remove (test_stats.TestNgramStats) ... ok
test_set (test_stats.TestNgramStats) ... ok
test_sum_counts (test_stats.TestNgramStats) ... ok
test_add (test_vocab.TestVocab) ... ok
test_delete (test_vocab.TestVocab) ... ok
test_get (test_vocab.TestVocab) ... ok
test_in (test_vocab.TestVocab) ... ok
test_index (test_vocab.TestVocab) ... ok
test_iter (test_vocab.TestVocab) ... ok
test_property (test_vocab.TestVocab) ... ok
test_string (test_vocab.TestVocab) ... ok

======================================================================
ERROR: test_maxent (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_maxent
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/saira/srilm-1.7.1/srilm-python-2/tests/test_maxent.py", line 4, in
import srilm.maxent
File "srilm/maxent.pyx", line 1, in init maxent
"""
ImportError: No module named 'base'

======================================================================
ERROR: test_ngram (unittest.loader._FailedTest)

ImportError: Failed to import test module: test_ngram
Traceback (most recent call last):
File "/usr/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
import(name)
File "/home/saira/srilm-1.7.1/srilm-python-2/tests/test_ngram.py", line 3, in
import srilm.ngram
File "srilm/ngram.pyx", line 1, in init ngram
"""
ImportError: No module named 'base'


Ran 27 tests in 0.035s

FAILED (errors=2)
Makefile:16: recipe for target 'test' failed
make: *** [test] Error 1

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

1 participant