Error in Look Up Table

Traceback (most recent call last):
  File "C:\Users\TTN\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\TTN\AppData\Local\Programs\Python\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\__main__.py", line 134, in <module>
    main()
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\__main__.py", line 116, in main
    cmdline_arguments.func(cmdline_arguments)
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\cli\train.py", line 58, in <lambda>
    train_parser.set_defaults(func=lambda args: train(args, can_exit=True))
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\cli\train.py", line 90, in train
    training_result = rasa.train(
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\train.py", line 94, in train
    return rasa.utils.common.run_in_loop(
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\utils\common.py", line 307, in run_in_loop
    result = loop.run_until_complete(f)
  File "C:\Users\TTN\AppData\Local\Programs\Python\Python38\lib\asyncio\base_events.py", line 616, in run_until_complete
    return future.result()
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\train.py", line 163, in train_async
    return await _train_async_internal(
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\train.py", line 325, in _train_async_internal
    new_fingerprint = await model.model_fingerprint(file_importer)
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\model.py", line 341, in model_fingerprint
    FINGERPRINT_NLU_DATA_KEY: nlu_data.fingerprint(),
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\shared\nlu\training_data\training_data.py", line 105, in fingerprint
    "lookup_tables": [
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\shared\nlu\training_data\training_data.py", line 106, in <listcomp>
    self._load_lookup_table(table) for table in self.lookup_tables
  File "C:\Users\TTN\AppData\Roaming\Python\Python38\site-packages\rasa\shared\nlu\training_data\training_data.py", line 82, in _load_lookup_table
    if Path(potential_file).is_file():
  File "C:\Users\TTN\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1420, in is_file
    return S_ISREG(self.stat().st_mode)
  File "C:\Users\TTN\AppData\Local\Programs\Python\Python38\lib\pathlib.py", line 1194, in stat
    return self._accessor.stat(self)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'version: "2.0"\nnlu:\n  - lookup: category\n    examples: |\n      - refrigerator\n      - washing machine\n      - air conditioner'

@vermaankit192 Can you please post

  1. The output of rasa --version, and
  2. A minimal example of a rasa project that produces this error
  3. The command that led to this traceback.
Rasa Version     : 2.4.0
Rasa SDK Version : 2.4.0
Rasa X Version   : 0.35.1
Python Version   : 3.8.5
Operating System : Windows-10-10.0.18362-SP0
Python Path      : C:\Users\TTN\AppData\Local\Programs\Python\Python38\python.exe

I have a look up table as category.txt inside data folder and lookup_tables subfolder. The content of category.txt is

refrigerator
washing machine
air conditioner

I am calling this inside nlu.md as

## lookup:category
data/lookup_tables/category.txt

When i train my model by python -m rasa train. the above error comes. However, this was not an error when I ran the model 10 days ago. but somehow this code is not working now.

Hi @vermaankit192

Thank you for the details. It looks like you found a Windows-related bug. I created an issue here. Until this is resolved, you will have to paste the lookup lists directly into your file (also we recommend to use yml instead of md; Markdown is deprecated). Sorry for the inconvenience!

Almost overlooked this. Did you update your rasa version or any packages in your environment in between?

No I didn’t update Rasa version nor any package

Giving path did not work for me either. I created a seperate .yml file for my lookup table and that works. You have to convert txt to yml using a simple script