There is a query to the database.
def get_valid_pumps_query(): session = Session() pumps = session.query(Pump).filter( Pump.max_stage_count > 0 ) return pumps there is a function to select the top list
def get_pumps_toplist(target, casing, selection_opts: SelectionOpts): valid_pumps = get_valid_pumps_query() # подгружаем и фильтруем насосы так, чтобы влезли в трубу с заданным зазором ... pumps_with_criteria.sort(key=lambda pwc: pwc[:3]) # возвращаем насосы, упорядоченные по метрике return [pump_with_criteria[-1] for pump_with_criteria in pumps_with_criteria] I have a problem with the data output
eps_list = app.get_pumps_toplist(attrs, well_state) for eps in eps_list: print(eps.motor.model) The result is:
70-STD KM-200-86
??? 20-117? 5
Question marks appear instead of Cyrillic.
Who knows why? How to solve a problem?
It is very strange that a friend of this problem is not observed. Those. he switched to git using git, he ran the code on my branch, and everything is fine with him.
print(repr(s))it still displays with a question mark'????6?-117/?1'print(ascii(s))did not help either. - Jacob Burtsev