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

AttributeError: 'str' object has no attribute 'get #43

Open
tvby opened this issue Jun 17, 2020 · 7 comments
Open

AttributeError: 'str' object has no attribute 'get #43

tvby opened this issue Jun 17, 2020 · 7 comments

Comments

@tvby
Copy link

tvby commented Jun 17, 2020

Sublime Text 3 (3211)
Win10
Latest Version of sublime-ide-r, LSP, and R 4.0.1
Each time that I enable disable LSP for a project or Globally I get the following:

Traceback (most recent call last):
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/configuration.py", line 80, in _on_done
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 375, in disable_config
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/windows.py", line 365, in update_configs
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/configurations.py", line 108, in update
  File "C:\Users\testing\AppData\Roaming\Sublime Text 3\Installed Packages\LSP.sublime-package\plugin/core/configurations.py", line 126, in _create_window_configs
AttributeError: 'str' object has no attribute 'get

In the r-ide settings I have pointed
the r_binary to the C:\Program Files R folder
the r_binary_lsp to the language server for R
am I missing something because autocomplete does not work

@tvby tvby closed this as completed Jun 17, 2020
@tvby
Copy link
Author

tvby commented Jun 17, 2020

posted in wrong repository

@randy3k
Copy link
Member

randy3k commented Jun 17, 2020

Actually, I think it is the correct place for it.

@tvby
Copy link
Author

tvby commented Jun 17, 2020

oh ok I will repost

@tvby tvby reopened this Jun 17, 2020
@randy3k
Copy link
Member

randy3k commented Jun 17, 2020

Actually I am not sure the cause of it, it is working fine locally on my mac.

@tvby
Copy link
Author

tvby commented Jun 17, 2020

The above message shows when the LSP package is enabled globally and only has the following
in the LSP settings causing rlang server to never run

{
	"clients":
	{
		"rlang":
		{
			"enabled": false,
		}
	}
}

but if the following is put in the LSP settings:

{
	"clients":
	{
		"rlang":
		{
			"command":
			[
				"R",
				"--slave",
				"-e",
				"C:\\Users\\tester\\Documents\\R\\win-library\\4.0\\languageserver\\libs\\x64\\languageserver.dll"
			],
			"enabled": true,
			"languageId": "r",
			"scopes":
			[
				"source.r"
			],
			"syntaxes":
			[
				"Packages/R/R.sublime-syntax"

			]
		}
	}
}

rlang starts but without any auto-completion

so is this the correct command if the R packages are not in the Program Files folder but in the RStudio win-library folder?

@randy3k
Copy link
Member

randy3k commented Jun 17, 2020

With R-IDE, you only need


{
	"clients":
	{
		"rlang":
		{
			"enabled": true,
		}
	}
}

@tvby
Copy link
Author

tvby commented Jun 18, 2020

Ok I get the rlang serving is starting and running but do not get auto-completions is there
another setting I am missing?

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