Python Forum
Key Error: os.environ["HOME"]
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Key Error: os.environ["HOME"]
#12
@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
Reply


Messages In This Thread
Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 02:34 PM
RE: Key Error: os.environ["HOME"] - by Axel_Erfurt - Jun-17-2021, 03:01 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 03:08 PM
RE: Key Error: os.environ["HOME"] - by Axel_Erfurt - Jun-17-2021, 03:16 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 03:19 PM
RE: Key Error: os.environ["HOME"] - by Axel_Erfurt - Jun-17-2021, 03:40 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 04:01 PM
RE: Key Error: os.environ["HOME"] - by Axel_Erfurt - Jun-17-2021, 04:20 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 04:37 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 04:49 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-17-2021, 05:34 PM
RE: Key Error: os.environ["HOME"] - by Anldra12 - Jun-18-2021, 02:21 PM
RE: Key Error: os.environ["HOME"] - by Axel_Erfurt - Jun-18-2021, 04:11 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  home automation using python barryjo 1 2,049 Jul-24-2022, 09:09 PM
Last Post: Larz60+
  /home/pi/.local/bin is not on PATH hcccs 3 14,762 Feb-08-2021, 10:12 PM
Last Post: Gribouillis
  Home Directory pgoosen 9 8,864 Oct-15-2020, 12:37 PM
Last Post: DeaD_EyE
  change to home directory Skaperen 2 3,251 Nov-28-2017, 02:53 AM
Last Post: Skaperen
  os.environ not setting current shell variables in Windows? brian6667 2 13,326 Apr-26-2017, 12:59 PM
Last Post: brian6667
  change to home directory Skaperen 4 13,261 Apr-20-2017, 05:54 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020