andriyko / sublime-robot-framework-assistant

Robot Framework plugin for Sublime Text3
MIT License
109 stars 43 forks source link

Not able to Create Database #198

Closed accesslubos closed 7 years ago

accesslubos commented 7 years ago

When I click Create Database, nothing happens. Here's what I get from console:

Traceback (most recent call last):
  File "./python3.3/subprocess.py", line 1104, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "C:\Users\lubos.jerabek\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\commands\scan.py", line 40, in run
    sublime.set_timeout_async(self.run_scan(file_), 0)
  File "C:\Users\lubos.jerabek\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\commands\scan.py", line 55, in run_scan
    startupinfo=startupinfo
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1110, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 818, in run_
    return self.run(edit)
  File "C:\Users\lubos.jerabek\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\commands\scan_and_index.py", line 53, in run
    sublime.set_timeout_async(add_builtin_vars(db_dir))
  File "C:\Users\lubos.jerabek\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\commands\scan_and_index.py", line 35, in add_builtin_vars
    f_table = open(table_path, 'r')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\lubos.jerabek\\AppData\\Roaming\\Sublime Text 3\\Packages\\Robot Framework Assistant\\database\\scanner\\BuiltIn-ca8f2e8d70641ce17b9b304086c19657.json'

In my Robot.sublime-settings file I have following customised:

"robot_framework_workspace": "C:\\Users\\lubos.jerabek\\Documents\\BitBucket\\acloudexpenses-lubos",
"robot_framework_automatic_database_update": true,
"robot_framework_database_path": "C:\\Users\\lubos.jerabek\\Documents\\BitBucket\\acloudexpenses-lubos",

When I navigate to the folder mentioned in log I can only find one file called scan_index.lol with nothing in it created at the very last moment when I ran the command. Am I doing something wrong or is it a RF Assistant issue?

aaltat commented 7 years ago

Most likely there is configuration problem in your plugin settings. Would it be possible to see your settings for the plugin?

accesslubos commented 7 years ago

@aaltat Should I just paste here whole Robot.sublime-settings file?

accesslubos commented 7 years ago
{
    "translate_tabs_to_spaces": true,
    "trim_trailing_white_space_on_save": true,
    "draw_white_space": "all",
    "word_separators": "./\\()\"'-:,.;<>~!@#$%^&|+=[]{}`~?",
    "robot_framework_workspace": "C:\\Users\\lubos.jerabek\\Documents\\BitBucket\\acloudexpenses-lubos",
    "robot_framework_keyword_argument_format": false,
    "robot_framework_extension": "robot",
    "path_to_python": "/usr/bin/python",
    "robot_framework_module_search_path":
        [
        ],
    "robot_framework_automatic_database_update": false,
    "robot_framework_libraries_in_xml": "/path/to/library/documentation",
    "robot_framework_builtin_variables":
        [
            "${/}",
            "${:}",
            "${\\n}",
            "${CURDIR}",
            "${DEBUG_FILE}",
            "${EMPTY}",
            "@{EMPTY}",
            "&{EMPTY}",
            "${EXECDIR}",
            "${False}",
            "${LOG_FILE}",
            "${LOG_LEVEL}",
            "${None}",
            "${null}",
            "${OUTPUT_DIR}",
            "${OUTPUT_FILE}",
            "${PREV_TEST_MESSAGE}",
            "${PREV_TEST_NAME}",
            "${PREV_TEST_STATUS}",
            "${REPORT_FILE}",
            "${SPACE}",
            "${SUITE_DOCUMENTATION}",
            "${SUITE_NAME}",
            "${SUITE_SOURCE}",
            "${TEMPDIR}",
            "${TEST_DOCUMENTATION}",
            "${TEST_NAME}",
            "${True}",
            "&{SUITE_METADATA}",
            "@{TEST_TAGS}"
        ],
    "robot_framework_database_path": "C:\\Users\\lubos.jerabek\\Documents\\BitBucket\\acloudexpenses-lubos",
    "robot_framework_log_commands": false
}

It seems it's now doing something - I changed the path_to_python to C:\Python27\python.exe however I'm still not able to scan the whole repository.

accesslubos commented 7 years ago

Okay this one is resolved. Thanks for your help!

aaltat commented 7 years ago

Good that you got the problem sorted out.

Updating the plugin internal database creates a log file, in the plugin installation directory, database/scan.log file. If someone keywords can not be found by the plugin, then the log file can provide more details why some library or test data scanning did fail.