Closed f2k1de closed 2 years ago
@f2k1de Great, thanks But i cannot run in Linux (class file has wrong version 60.0, should be 55.0)
After recompiling of Wiki.java, Vicuna run, not fail with API, but not working. (Linux, OpenJDK 11.0.12)
It works on my Linux (Arch Linux 5.14.11 with openjdk version "16.0.2" 2021-07-20). Which Linux Setup are you using, so that I can test it for this?
@f2k1de First "issue" is how to deliver Wiki.java? I don't want deliver copy of source code from other project. In ideal way we need use https://github.com/MER-C/wiki-java as library and build Vicuna with it.
As i understand with your change, there are versions of compiled java bytecode and this version don't work with my installed java :-D. This mean that i don't know with which versions is Vicuna working. Sic!
I am looking for some resolution for this.
Second issue: When i fill category, Wiki->listPages don't work because there is "Category:" string on begin Patch:
diff --git a/src/main/java/cuploader/CategoryHint.java b/src/main/java/cuploader/CategoryHint.java
index a179c00..e95fbb5 100644
--- a/src/main/java/cuploader/CategoryHint.java
+++ b/src/main/java/cuploader/CategoryHint.java
@@ -108,7 +108,7 @@ public class CategoryHint extends Thread {
try {
//get list
- String[] listPages = wiki.listPages("Category:"+text, null, Wiki.CATEGORY_NAMESPACE).toArray(new String[0]);
+ String[] listPages = wiki.listPages(text, null, Wiki.CATEGORY_NAMESPACE).toArray(new String[0]);^M
//remove loading
mCatHint.removeAll();
Third issue: I cannot upload. There is log:
Oct 14, 2021 1:49:59 PM Wiki getToken
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?&maxlag=5&meta=tokens&format=xml&action=query&type=csrf
Oct 14, 2021 1:50:00 PM Wiki upload
INFO: Fetching URL https://commons.wikimedia.org/w/api.php?&maxlag=5&format=xml&action=upload
No error.
Result in GUI:
Exception with upload is:
java.lang.UnknownError: MW API error. Server response was: <?xml version="1.0"?><api servedby="mw1343"><error code="missingparam" info="The "token" parameter must be set." xml:space="preserve">See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at &lt;https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/&gt; for notice of API deprecations and breaking changes.</error></api>
I found issue in wiki-java and waiting for merge (https://github.com/MER-C/wiki-java/pull/185) After this fix vicuna is working on my java 11 in Debian
@f2k1de I created updated PR (https://github.com/yarl/vicuna/pull/172). Could you test it?
Update org.wikipedia.Wiki to a version that supports gzip so that login works again. Should resolve #165