![]() |
Key Error: os.environ["HOME"] - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Key Error: os.environ["HOME"] (/thread-34002.html) Pages:
1
2
|
RE: Key Error: os.environ["HOME"] - Anldra12 - Jun-17-2021 whenever i apply pay-test form project setting its retun the same output for unittest() [u]it works for unittest but no output for pytest file as i run in my Pycharm it return error
RE: Key Error: os.environ["HOME"] - Anldra12 - Jun-18-2021 @Axel_Erfurt thanks for the help and assistance follow your suggestion i have to access 97% work but still i have these problems because the result is zero and i want histogram to check the histogram plot for the clustering doc and data set yet test pass but result is zero The main function def main(): if __name__ == "__main__": if len(sys.argv) != 4: print(' *', 'usage: <words file> <k, for doc 20>, <threshold, eg 0.9>') sys.exit(-1) f = sys.argv[1] k = int(sys.argv[2]) t = float(sys.argv[3]) words = load_tags(f) print(' *', 'generating dataset doc...') data, labels = make_data_matrix(words, t) print(' *', 'clustering doc...') word_cluster(data, labels, k=k, show_histogram_plot=True)test_clustering_probability.py::TestSet::test_will_work PASSED [100%] ============================== warnings summary =============================== ..\..\Python3.8.0\Python\lib\site-packages\scipy\sparse\sparsetools.py:21 D:\Python3.8.0\Python\lib\site-packages\scipy\sparse\sparsetools.py:21: DeprecationWarning: scipy.sparse.sparsetools is deprecated!scipy.sparse.sparsetools is a private module for scipy.sparse, and should not be used. _deprecated() -- Docs: https://docs.pytest.org/en/stable/warnings.html ======================== 1 passed, 1 warning in 1.85s ========================= Process finished with exit code 0 RE: Key Error: os.environ["HOME"] - Axel_Erfurt - Jun-18-2021 From a few snippets of code, nobody can tell what is supposed to happen and where the error is. |