Coder Social home page Coder Social logo

Comments (12)

tosher avatar tosher commented on June 8, 2024

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.

usernamed avatar usernamed commented on June 8, 2024

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
sitecon = mw_get_connect(password)
File "
/.config/sublime-text-3/Packages/Mediawiker/mediawiker.py", line 176, in mw_get_connect
sitecon = mwclient.Site(host=addr, path=path)
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 115, in init
self.site_init()
File "
/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 122, in site_init
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
info = self.raw_api(action, *_kwargs)
File "
/.config/sublime-text-3/Packages/Mediawiker/mwclient/client.py", line 283, in raw_api
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
stream = self.connection.post(self.host, url, data=data, headers=headers)
File "
/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 301, in post
return self.find_connection(host).post(host, path, headers, data)
File "/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 224, in post
return self.request('POST', host, path, headers, data)
File "
/.config/sublime-text-3/Packages/Mediawiker/mwclient/httpmw.py", line 173, 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:

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.

tosher avatar tosher commented on June 8, 2024

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.

usernamed avatar usernamed commented on June 8, 2024

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.

tosher avatar tosher commented on June 8, 2024

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.

tosher avatar tosher commented on June 8, 2024

Oh.. "Mediawiker: http_compat reloaded" - in sublime 3 only..

Which messages from Mediawiker about ssl and http in Sublime 3?

from mediawiker.

usernamed avatar usernamed commented on June 8, 2024

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: versionGLIBC_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.

tosher avatar tosher commented on June 8, 2024
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:

As i see, current libs is incompatible with libs on your system or system haven't required libs.

from mediawiker.

usernamed avatar usernamed commented on June 8, 2024

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.

tosher avatar tosher commented on June 8, 2024

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.

usernamed avatar usernamed commented on June 8, 2024

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.

tosher avatar tosher commented on June 8, 2024

Thanks for your interest to plugin!
Waiting for your results..

from mediawiker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.