Giter Club home page Giter Club logo

Comments (7)

TheMak avatar TheMak commented on July 23, 2024

I did some more testing. If you enter in at least two letters into the search field, select Upload Date from the pull down menu, and then hit Server Search, you will get back a query.

If you then delete the text in the search field, you will now get a list of mods with the most recently uploaded first.

Just an FYI.

from server.

TheMak avatar TheMak commented on July 23, 2024

Whatever changes have been made has made the problem worse.

The workaround that I described above for listing the most recent uploaded mods to the vault no longer works. It instead continues to use the initial top 100 rated mods that pop up when you open the mod vault. In order to find a mod now you need to know at least a few characters in the right order for it to show up in the results lists.

from server.

Sheeo avatar Sheeo commented on July 23, 2024

No changes were made to the mod vault since october.

from server.

TheMak avatar TheMak commented on July 23, 2024

That is correct, the issue is somehow related to the query search.

Before the date I had posted above, if you leave the text field blank, set the pull down menu to Upload Date, and then click on Server Search it would return a list of the most resent uploaded mods.

If you try this step today, the search will hang the lobby and the error that I had listed above will spam the log.

It is as if the server does not know how to handle a query that is blank. If you enter in at least two letters it will return a query (will search through the mod name and the author field) and present the results with the most recent uploaded mod first. If you go back to the text field and erase the two characters you entered in (note: do not hit Server Search button), you will now see a list that contains the return result mixed with the initial list of most rated mods, sorted by date of upload with the most recent at the top of the list.

from server.

TheMak avatar TheMak commented on July 23, 2024

I am trying to pin down the issue, but I am not following to well the programming language.

In lobby/src/modvault/__init__.py
at line 178
there is the function: def search(self):
This sends the contents of the search query textfield to the function modvault_search

I think there may be a problem here if there is no text (blank) entered. It has worked in the past, just do not know why not now.

Continuing on..

modvault_search is located in server/replays/replayServerThread.py
line 80, that begins with
def command_modvault_search(self, message):

In that function there were two commits made on February 4 that was labeled Convert to Python 3. This commit affected a number of files so it is a bit hard to find this file amongst all the changes.

Anyways, in server/replays/replayServerThread.py the two changes were as follows (there was a recent commit on March 16 so I am using the new line numbers):

on line 129:
while next(query):

it was:
while query.next():

and on line 148:
thumbstr = config['global']['content_url'] + "vault/mods_thumbs/" + urllib.parse.quote(icon)

it was:
thumbstr = config['global']['content_url'] + "vault/mods_thumbs/" + urllib2.quote(icon)

I think the issue may be at line 129. I have been trying to find out if there is an order or logic issue, but I cannot seem to find one.

In all my testing on the search field, I have managed to crash the client when entering this list of two characters and running a server search:
al, an, as, im, ol, on, us

Also any single digit number entered in the text field works fine for the query.

I have had the query return no results on a number of two character searches such as aq and the client did not crash.

So the client is able to send back a query and able to return an empty query.

So I am puzzled as to why a query with no text or the list of two characters from above will hang the client.

In my testing the two characters I used was a vowel and any other letter. I ran through every combination of that for each vowel (a, e, i, o, u, and y).

Either way, not being able to see the latest mods that have been uploaded sucks.

from server.

Sheeo avatar Sheeo commented on July 23, 2024

Use the master branch for tracking down problems in currently deployed code.

Python3 is not yet live, but indeed 2to3 wrongfully replaced all occurences of query.next() with next(query)

from server.

micheljung avatar micheljung commented on July 23, 2024

I wasn't able to reproduce this any longer

from server.

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.