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

Error in tests with unittest on Windows 10 (x64) #46

Open
lonnietc opened this issue Jul 19, 2023 · 1 comment
Open

Error in tests with unittest on Windows 10 (x64) #46

lonnietc opened this issue Jul 19, 2023 · 1 comment

Comments

@lonnietc
Copy link

Hello,

I have just come across CogDB that I might be trying to use in a cross-platform AI project coming up but ran into an error with one of the tests.

I am working on Windows 10 (x64) with Python 3.11.4

> python -m unittest

.
.
.
.
D:\AI-Some\GraphDB\CogDB\test\cog\torque.py:265: DeprecationWarning: The use of func is deprecated, please use filter instead.
  warnings.warn("The use of func is deprecated, please use filter instead.", DeprecationWarning)
.D:\AI-Some\GraphDB\CogDB\test\cog\torque.py:288: DeprecationWarning: The use of func is deprecated, please use filter instead.
  warnings.warn("The use of func is deprecated, please use filter instead.", DeprecationWarning)
...*** deleted test data.
......*** deleted test data.
.....*** deleted test data.

======================================================================
ERROR: test_torque_load_csv (test.test_torque2.TorqueTest2.test_torque_load_csv)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\AI-Some\GraphDB\CogDB\test\test\test_torque2.py", line 42, in test_torque_load_csv
    g.load_csv(csv_file, "isbn")
  File "D:\AI-Some\GraphDB\CogDB\test\cog\torque.py", line 206, in load_csv
    self.cog.load_csv(csv_path, id_column_name, graph_name)
  File "D:\AI-Some\GraphDB\CogDB\test\cog\database.py", line 425, in load_csv
    for row in reader:
  File "C:\PythonPython311\Lib\csv.py", line 111, in __next__
    row = next(self.reader)
          ^^^^^^^^^^^^^^^^^
  File "C:\PythonPython311\Lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 709: character maps to <undefined>

----------------------------------------------------------------------
Ran 69 tests in 2.896s

FAILED (errors=1)

Any ideas as to what may be happening here?
Thanks in advance

@arun1729
Copy link
Owner

is this only happening for this one test test.test_torque2.TorqueTest2.test_torque_load_csv ? Could you try commenting out this test

def test_torque_load_csv(self):
and run the tests again?

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