Closed aaltat closed 8 years ago
By having the db being created automatically, this issue is not as prevalent, but it still does happen when creating the db for the first time.
This bug should really be marked as a blocker - it can really make it impossible sometimes to create and integrate new testcases.
I can not reproduce this bug. @georgecarstoiu have you found a reliable manner to reproduce the bug?
It could be that Sublime Text 3 build 3114 did contain a fix for this:
Fixed a scenario where changes to .tmPreferences files weren't being picked up
or the
API: Changes to how plugins are loaded. This should be transparent, but resolves a number of corner cases
. Because I can not anymore reproduce the problem in anyway perhaps it does not anymore exist.
I am using the latest build of SB3 3114 from the 12th of May and I am getting the error 85% of the times. This is when running on Win7 x64.
The strange thing is that I have the exact same configuration running on a Win8 x64 machine, and everything seems to be working fine there. I never had one error.
Could this be OS based? Can it be fixed without having to install Win8?
I run Windows 7 (x64) and I have not seen the error since the build 3114 came. Yesterday I did try to repeat the bug for a long time and was not able to repeat the bug.
I have feeling that this could be some sort of caching issue, somewhere. But because it happens for you so often, could you change the scan_and_index.py line 28 from:
return arg_list
to
print(arg_list)
return arg_list
It will print the arguments which it did get from the configuration files, to the Sublime console, which the plugin uses to start launch the indexing process. Could you send me the output?
Modified the scan_and_index.py as per your instructions, but the problem is that whenever I execute the 'Create db' command, SB3 freezes and I cannot see the output in the console.
Is there a log somewhere that logs the output of the console even if SB3 freezes?
That does not go to the log file, but lets do it in other way. First remove the previous modifications. Then in same file, after the line 48 add new line:
print(index_popen_arg_parser())
It should look like this:
class ScanIndexCommand(sublime_plugin.TextCommand):
def run(self, edit):
print(index_popen_arg_parser())
log_file = get_setting(SettingObject.log_file)
Modified and this is what the console is showing every time I start SB3. Can't run the 'Create db' as it is greyed out.
Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 78, in reload_plugin
m = importlib.import_module(modulename)
File "./python3.3/importlib/init.py", line 90, in import_module
File "
Python is space sensitive language. There should be 8 spaces before the print(index_popen_arg_parser())
text and tabs are not allowed. It must align with the log_file = get_setting(SettingObject.log_file)
line correctly.
My bad :) - modified the file again and this is what I got when trying to run the Create db command:
Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublimeplugin.py", line 574, in run return self.run(edit) File "C:\Users\george.carstoiu\AppData\Roaming\Sublime Text 3\Packages\Robot Framework Assistant\commands\scan_and_index.py", line 49, in run print(index_popen_arg_parser()) TypeError: index_popen_arg_parser() missing 1 required positional argument: 'mode'
I guess I am still missing something?
My bad this time, should have write: print(index_popen_arg_parser("all"))
Again, once I start the Create db command, ST3 freezes and I cannot see any output in the console.
Hmmm, really strange. That function only gets the configurations and only print was added. I need to think about it, but it will take time.
Take your time. I will try to make a fresh install of everything later on as well when I have some time and get back to you if the problem persists.
There is other way to print the parameters. Again, first undo all the other changes. Then open the run_index.py file. Then add line, after line 68 and print the args. If you have installed Robot Framework with Python 2 the print looks like this:
args = c_parser.parse_args()
print args
module_search_path = []
Or if you are using Python 3 with Robot Framework, then it looks like this:
args = c_parser.parse_args()
print(args)
module_search_path = []
This time the output goes to a log file. The log file can be found from the plugin installation directory:
Packages\Robot Framework Assistant\database\scan_index.log
and when plugin works normally if contains something like this:
Namespace(db_path='C:\\Users\\UserName\\AppData\\Roaming\\Sublime Text 3\\Packages\\Robot Framework Assistant\\database\\scanner', db_table=None, index_path='C:\\Users\\UserName\\AppData\\Roaming\\Sublime Text 3\\Packages\\Robot Framework Assistant\\database\\index', mode='all', module_search_path=['D:\\workspace\\robotframework-from-sublime\\test\\resource\\test_data\\suite_tree', 'D:\\workspace\\sublime-robot-framework-assistant\\test\\resource\\test_data\\real_suite'], path_to_lib_in_xml='D:\\workspace\\robotframework-from-sublime\\test\\resource\\library')
Check the log file output against the settings you have defined and tell if there are any differences. Also send the line containing Namespace(... for me to look too.
Uninstalled everything and started from scratch. It took a bit to configure everything but good that now it works.
Will keep an eye on this issue and will let you know if I run into it again. Until then I think we should close this ticket.
Thanks for the support and the effort! :)
Let's keep the issue open for some time and if I don't see the problem or hear from someone that problem still exists I will then close the issue.
Happy testing and have a nice weekend.
I assume that this is not anymore problem and bug and be safely closed. If it is a problem, let me know and I will reopen the issue.
Have been using it without any problems now for almost 2 weeks. No issues whatsoever.
Ok good to know
Sometimes
Robot Framework: Create Database
fails and the following error is seen in the log file: