Sublime Forum

No working W3C validation plugin in Sublime text anymore?

#21

@UltraInstinct05
Yes I understand, but would there be a way to lead this plugin to an other version of python that makes it work again. The code I posted says(or I’m wrong I’m no plugin developer) load python in any version of 3
or am I mistaken? Can’t find any other URL to python in all the code. Because otherwise all plugins I have are confronted with that other python version.

0 Likes

#22

Sublime Text 4 offers only 2 python environments, 3.3 (the precise python version is 3.3.6) & 3.8 (the precise python version is 3.8.8). You can’t run the plugin code in any python version other than these 2 (& you can’t use your system python either because ST ships with it’s own patched python interpreters). However, it may not be the python version that’s causing issues here.

Looking at the plugin again, it’s got a dependencies.json depending on requests module. So, can you try the following ?

  1. From the command palette, run Package Control: Satisfy Dependencies. This should fetch the requests module.
  2. Open the plugin file, save and see if there are any errors. Or just open an HTML document, run one of the command palette options the plugin provides and see if there are any errors logged.
0 Likes

#23

Wished someone could fix this plugin! I’m no plugin developer. This is the report:

Traceback (most recent call last):
File "C:\Program Files\Sublime Text 3\Lib\python33\sublime_plugin.py", line 1494, in run_
return self.run(edit)
File "C:\Users\David\AppData\Roaming\Sublime Text 3\Installed Packages\W3CValidators.sublime- 
package\W3CValidators.py", line 64, in run
File "C:\Users\David\AppData\Roaming\SUBLIM~1\Packages\requests\all\requests\api.py", line 112, 
in post
return request('post', url, data=data, json=json, **kwargs)
File "C:\Users\David\AppData\Roaming\SUBLIM~1\Packages\requests\all\requests\api.py", line 58, 
in request
return session.request(method=method, url=url, **kwargs)
File "C:\Users\David\AppData\Roaming\SUBLIM~1\Packages\requests\all\requests\sessions.py", 
line 522, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\David\AppData\Roaming\SUBLIM~1\Packages\requests\all\requests\sessions.py", 
line 642, in send
r = adapter.send(request, **kwargs)
File "C:\Users\David\AppData\Roaming\SUBLIM~1\Packages\requests\all\requests\adapters.py", 
line 
513, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 
(_ssl.c:548)
0 Likes

#24

Switching to the python 3.8 plugin host as described in the documentation I linked should fix that error.

0 Likes

#25

I need hands on documentation! The link you gave me doesn’t explain how to do it!
Are there any simple steps on how to achieve this?

0 Likes

#26
  • Download the plugin from github (or clone it using git) into your Packages folder for ST.
  • Create a new file inside W3CValidators called .python-version
  • Make the content of said file 3.8

The plugin should then run inside the python 3.8 plugin environment instead of the 3.3 one.

Though honestly I’d still suggest running the validation locally using a custom build system, as the plugin is uploading your code to w3.org every time in order to do the validation.

2 Likes

#27

It may be worth pointing out that if the package uses dependency libraries, which from the above it sounds like it might, it won’t run in the 3.8 host because the current version of Package Control doesn’t support that yet.

2 Likes

#28

Ah, shucks. I totally forgot about that. So my previous help becomes void.

1 Like

#29

And this is a real issue where Python 3.3 is flagged/blocked on security ground, even though ST’s Python 3.3 is a custom build. So right now no more use of package control for me. Still ST is awesome!

0 Likes