cancel
Showing results for 
Search instead for 
Did you mean: 

No module named collections

Former Member
0 Kudos
920

Hi Experts,

I've installed TREX 7.0(standalone, win32). I'm trying to enable semantic search by following the document at 'https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f0d3be0e-0401-0010-b780-ff7e4e103ea0'.

In the step 3., when i try to create a .xtm file using

"txt2xtm.py --input=

<TREX_DIR> opicmapsexampleexample.txt -- output=<TREX_DIR> opicmapsexampleexample.xtm"

(in my case, txt2xtm.py --input=C:usrsapTRXTRX00exe opicmapsexampleexample.txt --output=C:usrsapTRXTRX00exe opicmapsexampleexample.xtm)

I get the import error, 'No module named collections'.

I searched for 'collections.py' file in the entire directory where trex was installed(C:usrsap), but found result is zero.

It requires to activate the python activation as given in,

'http://help.sap.com/saphelp_nw04s/helpdata/en/fe/72f11aae4f754d90f44680283a3634/frameset.htm'

Here, i followed 'Activate the Python extension handler' and in 'Registering the Python extensions' part , I changed "if '0' to '1'" for 'Topic Map' and 'Semantic Search' extensions.

Here're the commands executed in command prompt,

"

C:Documents and SettingsC5119720>cd C:usrsapTRXTRX00

C:usrsapTRXTRX00>TREXSettings.bat

C:usrsapTRXTRX00>cd C:usrsapTRXTRX00exeextensionsxtm

C:usrsapTRXTRX00exeextensionsxtm>txt2xtm.py --input=C:usrsapTRXTRX00exe opicmapsexampl

eexample.txt --output=C:usrsapTRXTRX00exe opicmapsexampleexample.xtm

Traceback (most recent call last):

File "C:usrsapTRXTRX00exeextensionsxtm xt2xtm.py", line 4, in <module>

from testbase import TestBase, TestError

File "C:usrsapTRXTRX00exeextensionsxtm estbase.py", line 2, in <module>

import os, sys, string, thread, threading, time, fuzzypy

File "C:usrsapTRXTRX00exePythonlib hreading.py", line 13, in <module>

from collections import deque

ImportError: No module named collections

C:usrsapTRXTRX00exeextensionsxtm>

"

Please suggest how to get this 'collections' module.

Thanks,

Arun

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi All,

I got the solution for this. I've been executing the scripts txt2xtm.py without using 'python' keyword. The screenshots given in the document doesn't contain this information and it's relevant for a release lower than 7.0. After adding 'python' keyword before the script name, the error has gone.

Best Regards,

Arun