question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cfml_completion_docs setting is being ignored

See original GitHub issue

Thank you for making this plugin. It makes ColdFusion development in Sublime Text sooooo much easier.

I am using the sublimetext-cfml v0.26.10 with Sublime Text 3.0 build 3143 on Windows 7. My corporate network blocks network requests that don’t go through the corporate proxy, including requests sublimetext-cfml makes to cfdocs.org.

My User/cfml_package.sublime-settings file has both of the docs settings turned off:

{
	"cfml_hover_docs": false,
	"cfml_completion_docs": false
}

However, the entire Sublime Text application still freezes up for about 20 seconds when I am editing a CF function (tags do not cause a problem). When a freeze occurs, this is the error in my console:

Traceback (most recent call last):
  File "./python3.3/urllib/request.py", line 1248, in do_open
  File "./python3.3/http/client.py", line 1065, in request
  File "./python3.3/http/client.py", line 1103, in _send_request
  File "./python3.3/http/client.py", line 1061, in endheaders
  File "./python3.3/http/client.py", line 906, in _send_output
  File "./python3.3/http/client.py", line 844, in send
  File "./python3.3/http/client.py", line 1198, in connect
  File "./python3.3/socket.py", line 435, in create_connection
  File "./python3.3/socket.py", line 426, in create_connection
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

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 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\cfml_plugin.py", line 54, in on_query_completions
    return completions.get_completions(view, locations[0], prefix)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\completions.py", line 28, in get_completions
    completionlist = callback(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\__init__.py", line 12, in get_completions
    return basecompletions.get_script_completions(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\basecompletions.py", line 55, in get_script_completions
    param_completions = get_param_completions(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\basecompletions.py", line 174, in get_param_completions
    data, success = cfdocs.get_cfdoc(cfml_view.function_call_params.function_name)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\cfdocs\cfdocs.py", line 93, in get_cfdoc
    return fetch_cfdoc(function_or_tag)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\cfdocs\cfdocs.py", line 132, in fetch_cfdoc
    json_string = urllib.request.urlopen(full_url).read().decode("utf-8")
  File "./python3.3/urllib/request.py", line 156, in urlopen
  File "./python3.3/urllib/request.py", line 469, in open
  File "./python3.3/urllib/request.py", line 487, in _open
  File "./python3.3/urllib/request.py", line 447, in _call_chain
  File "./python3.3/urllib/request.py", line 1289, in https_open
  File "./python3.3/urllib/request.py", line 1251, in do_open
urllib.error.URLError: <urlopen error [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond>

I suspect the cfml_completion_docs setting is being ignored and a request to cfdocs.org is still being attempted. Is there another docs setting I should turn off in order to prevent the package from making requests to cfdocs.org?

As a short-term fix, I have changed src/cfdocs/cfdocs.py Line 93 from

return fetch_cfdoc(function_or_tag)

to

return None

This has “fixed” the freezing issue, but I’m sure it’s not an ideal solution. When I do edit a CF function, I get the following error in console (although the application does not freeze):

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\cfml_plugin.py", line 54, in on_query_completions
    return completions.get_completions(view, locations[0], prefix)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\completions.py", line 28, in get_completions
    completionlist = callback(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\__init__.py", line 12, in get_completions
    return basecompletions.get_script_completions(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\basecompletions.py", line 55, in get_script_completions
    param_completions = get_param_completions(cfml_view)
  File "C:\Users\EPARYJ6\AppData\Roaming\Sublime Text 3\Packages\sublimetext-cfml-master\src\basecompletions\basecompletions.py", line 174, in get_param_completions
    data, success = cfdocs.get_cfdoc(cfml_view.function_call_params.function_name)
TypeError: 'NoneType' object is not iterable

I’m sorry I can’t write a real Pull Request to help address this issue, but I don’t know Python at all.

Thank you

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jcberquistcommented, Apr 10, 2018

Incidentally, that return None you edited is supposed to return a tuple, which is why you are still seeing an error after editing it - you could try return None, False instead.

0reactions
jcberquistcommented, Apr 16, 2018

I have added a setting "cfdocs_enabled" to the package settings which you can set to false to disable the cfdocs integration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build artifact retention setting being ignored - Stack Overflow
Build artifact retention setting being ignored. This behavior is by designed and is not a issue. As we know, the artifacts and attachments ......
Read more >
Coverage include config being ignored · Issue #6234 - GitHub
I looked at the code and it turns out that code coverage is not filtered if there is no files specified in include...
Read more >
How to Deal With Being Ignored | Relationship Coach Online
1. Your partner may simply need some space to collect their thoughts and deal with their own emotions. Give them time and work...
Read more >
Windows 10 - Sleep settings being ignored
My sleep settings are 1 hour but Windows 10 is ignoring the settings and putting laptop to sleep after 5 mins of inactivity....
Read more >
'A' record on my domain name DNS settings being ignored
I've spent three hours on the phone to my ISP (BT) about it, and they couldn't help, except to find that it wasn't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found