Comments (12)
Hi!
It's correct way:
"host": "server.org:12345"
Maybe firewall or something? Which messages you see in console, when trying to open page?
from mediawiker.
Hi,
here's the message:
Traceback (most recent call last):
File "~/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 168, in request
res = self._conn.getresponse()
File "X/http/client.py", line 1131, in getresponse
File "X/http/client.py", line 354, in begin
self.require(1, 10)
File "X/http/client.py", line 336, in _read_status
postdata = {}
http.client.BadStatusLine:
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/sublime_text/sublime_plugin.py", line 543, in run_
return self.run(edit, *_args)
File "/.config/sublime-text-3/Packages/Mediawiker/mediawiker.py", line 552, in run/.config/sublime-text-3/Packages/Mediawiker/mediawiker.py", line 176, in mw_get_connect
sitecon = mw_get_connect(password)
File "
sitecon = mwclient.Site(host=addr, path=path)
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 115, in init/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 122, in site_init
self.site_init()
File "
meta = self.api('query', meta='siteinfo|userinfo', siprop='general|namespaces', uiprop='groups|rights')
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 185, in api/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 283, in raw_api
info = self.raw_api(action, *_kwargs)
File "
json_data = self.raw_call('api', data).read().decode('utf-8')
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 254, in raw_call/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 301, in post
stream = self.connection.post(self.host, url, data=data, headers=headers)
File "
return self.find_connection(host).post(host, path, headers, data)
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 224, in post/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 173, in request
return self.request('POST', host, path, headers, data)
File "
res = self._conn.getresponse()
File "X/http/client.py", line 1131, in getresponse
File "X/http/client.py", line 354, in begin
self.require(1, 10)
File "X/http/client.py", line 336, in _read_status
postdata = {}
http.client.BadStatusLine:
I was assuming that is port-related, because when I only change the value of "host" to an internal server name (w/o port) then everything works.
With the last line of the log in mind, it could be that the http client connects to the https port 12345, but speaks http only, although "https":true was set.
Cheers!
from mediawiker.
Can you check the same test on Sublime 2? I have some ideas (issue in py3 code), but haven't test server with the same settings.
from mediawiker.
In sublime2, we get:
Reloading plugin ~/.config/sublime-text-2/Packages/Mediawiker/mediawiker.py
Mediawiker: enabling custom linux ssl module
Mediawiker: successfully loaded ssl module for libssl.so.1.0.0
HTTPS is not available in this python environment, trying http: 'module' object has no attribute 'HTTPSConnection'
found 5 files for base name Default.sublime-keymap
found 3 files for base name Main.sublime-menu
Generating syntax summary
theme loaded
reloading ~/.config/sublime-text-2/Packages/Mediawiker/Mediawiker.sublime-settings
reloading ~/.config/sublime-text-2/Packages/Mediawiker/Mediawiker.sublime-settings
reloading ~/.config/sublime-text-2/Packages/Mediawiker/Mediawiker.sublime-settings
reloading ~/.config/sublime-text-2/Packages/User/Mediawiker.sublime-settings
Traceback (most recent call last):
File "./sublime_plugin.py", line 356, in run
File "./mediawiker.py", line 551, in run
File "./mediawiker.py", line 175, in mw_get_connect
File "./mwclient/client.py", line 115, in init
self.site_init()
File "./mwclient/client.py", line 122, in site_init
meta = self.api('query', meta='siteinfo|userinfo', siprop='general|namespaces', uiprop='groups|rights')
File "./mwclient/client.py", line 185, in api
info = self.raw_api(action, **kwargs)
File "./mwclient/client.py", line 287, in raw_api
return json.loads(json_data)
File ".\json__init__.py", line 307, in loads
File ".\json\decoder.py", line 319, in decode
File ".\json\decoder.py", line 338, in raw_decode
ValueError: No JSON object could be decoded
I'm worried about the SSL message on the top: mediawiker finds libssl, but python might falls back to http?!
from mediawiker.
Yes, ssl is not loaded successfully..
We must see two messages in console after message about libssl (with latest version):
Mediawiker: http_compat reloaded. Mediawiker: HTTPS is available.
from mediawiker.
Oh.. "Mediawiker: http_compat reloaded" - in sublime 3 only..
Which messages from Mediawiker about ssl and http in Sublime 3?
from mediawiker.
What version is needed?
openssl version
OpenSSL 1.0.1e 11 Feb 2013
I checked in a python console. It seems to load SSL:
import socket
socket.ssl
returns function ssl at 0x4038b0
Okay, just saw your next message --> this is what sublime 3 puts into the log:
reloading plugin Mediawiker.mediawiker
Mediawiker: enabling custom linux ssl module
Mediawiker: _ssl module import error - /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.14' not found (required by ~/.config/sublime-text-3/Packages/Mediawiker/lib/st3_linux_x64/libssl-1.0.0/_ssl.cpython-33m.so) Mediawiker: _ssl module import error - /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.14' not found (required by ~/.config/sublime-text-3/Packages/Mediawiker/lib/st3_linux_x64/libssl-1.0.0/_ssl.cpython-33m.so)
Mediawiker: _ssl module import error - /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ~/.config/sublime-text-3/Packages/Mediawiker/lib/st3_linux_x64/libssl-1.0.0/_ssl.cpython-33m.so)
Mediawiker: http_compat reloaded.
HTTPS is not available in this python environment, trying http: 'module' object has no attribute 'HTTPSConnection'
from mediawiker.
I checked in a python console
Sublime using his own python package, and on linux it not include ssl.
Now, mediawiker using ssl libs from SFTP pugin:
- http://sublimetext.userecho.com/topic/50801-bundle-python-ssl-module/
- http://www.sublimetext.com/forum/viewtopic.php?f=6&t=5633
As i see, current libs is incompatible with libs on your system or system haven't required libs.
from mediawiker.
Hi tosher,
that explains it. SFTP's ssl support requires libc >= 2.14, whereas Debian wheezy has 2.13.
Is there any way to get ssl support for libc 2.13 or to enable ssl support directly in sublime's python?
Thanks for your support!
from mediawiker.
As i think, custom way is:
Install locally same python as sublime using, get lib and put into mediawiker libs directory, st3 linux subdir.
Or... update the system :)
from mediawiker.
Good idea, I will try the first option.
Or... update the system :)
I know :( but I'm on Debian stable and that should be sufficient ;)
Thanks for your patience and precious help! Cheers.
from mediawiker.
Thanks for your interest to plugin!
Waiting for your results..
from mediawiker.
Related Issues (20)
- Updates to Mediawiker delete custom wiki entries in sublime-settings file. HOT 4
- Visual Studio Code? HOT 2
- Edit summaries in the console HOT 3
- Occasional TypeError exception for get_page HOT 7
- Connection exception: 'HTTPError' object does not support indexing - GSSAPI Authentication HOT 9
- Automatically converting tabs to spaces/spaces to tabs on load HOT 6
- Shorten the summary / description
- Certificate failing HOT 9
- No option to "Open page" in Command Palette HOT 7
- syntax highlighter doesn't recognize <math> tags with "display=..." attributes HOT 2
- Support per-site "new_page_template_path" overriding the default
- Keys start acting strange after saving a page
- Chrome cookies not working: "cookies_browser": "chrome",
- authentication via firefox failing HOT 1
- File Load usage HOT 1
- InsecureRequestWarning -- wants a verified cert but those fail HOT 1
- 12 months of inactivity of repository owner HOT 2
- Code folding HOT 5
- [SSL: CERTIFICATE_VERIFY_FAILED] on wiki connection HOT 2
- "Unable to get page" on private wiki HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mediawiker.