Comments (11)
Does the same page open without problem using ST2?
from mediawiker.
Aye, same wiki server, same config, same page names. In ST3, I'm not even offered the "" default text. I'll gladly make a short video :-)
Sent from my iPad
On 25/06/2013, at 15.13, tosher [email protected] wrote:
Does the same page open without problem using ST2?
—
Reply to this email directly or view it on GitHub.
from mediawiker.
With page "Sublime Text" on english wikipedia and some pages from my wiki i haven't any problems.. very strange.
(ST3 dev build 3045)
from mediawiker.
Please, add string to mwclient/client.py
print(e)
before string
if e[0] not in (u'unknown_action', u'readapidenied'):
on the same tab level.. and check console data once more.
from mediawiker.
Forked and patched; only change is the line number in the console log:
Traceback (most recent call last):
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 113, in __init__
self.site_init()
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 121, in site_init
meta = self.api('query', meta='siteinfo|userinfo', siprop='general|namespaces', uiprop='groups|rights')
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 187, in api
res = self.handle_api_result(info, token=token)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 214, in handle_api_result
raise errors.APIError(info['error']['code'], info['error']['info'], kwargs)
errors.APIError: ('readapidenied', 'You need read permission to use this module', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 293, in run
sitecon = mw_get_connect(password)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 45, in mw_get_connect
sitecon = mwclient.Site(addr, path)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 117, in __init__
if e[0] not in (u'unknown_action', u'readapidenied'):
TypeError: 'APIError' object does not support indexing
If I try to change to e[0]
:
Traceback (most recent call last):
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 113, in __init__
self.site_init()
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 121, in site_init
meta = self.api('query', meta='siteinfo|userinfo', siprop='general|namespaces', uiprop='groups|rights')
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 187, in api
res = self.handle_api_result(info, token=token)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 214, in handle_api_result
raise errors.APIError(info['error']['code'], info['error']['info'], kwargs)
errors.APIError: ('readapidenied', 'You need read permission to use this module', None)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 543, in run_
return self.run(edit, **args)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 293, in run
sitecon = mw_get_connect(password)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mediawiker.py", line 45, in mw_get_connect
sitecon = mwclient.Site(addr, path)
File "/Users/jandahl/Library/Application Support/Sublime Text 3/Packages/Mediawiker/mwclient/client.py", line 116, in __init__
print(e[0])
TypeError: 'APIError' object does not support indexing
from mediawiker.
Print data will be before error messages in console..
and needs print(e), not print(e[0]) :)
from mediawiker.
For better result:
print('---') print(e) print('---')
from mediawiker.
I tried with both print(e)
and print(e[0])
because the former didn't produce output :)
From line 111 and forward:
if do_init:
try:
self.site_init()
except errors.APIError as e:
# Private wiki, do init after login
dashes = "-------"
print(dashes, e, dashes)
if e[0] not in (u'unknown_action', u'readapidenied'):
raise
Gave me this:
------- ('readapidenied', 'You need read permission to use this module', None) -------
from mediawiker.
Try to use:
if e.code not in (u'unknown_action', u'readapidenied'):
instead of:
if e[0] not in (u'unknown_action', u'readapidenied'):
But we have result 'You need read permission to use this module'..
from mediawiker.
IT WORKS! :-D
from mediawiker.
Aaaand you patched it while I was messing about with branched forks. Awesome!
from mediawiker.
Related Issues (20)
- 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
- Follow Special:MyPage links when opening pages HOT 1
- Sublime release 4172 is breaking Mediawiker HOT 4
- "Open page in SublimeText" gadget
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.