Skip to content

Commit

Permalink
Merge pull request #58 from lenianiva/bug/non-ascii
Browse files Browse the repository at this point in the history
fix: Non-ascii symbol in payload
  • Loading branch information
lenianiva authored Jan 14, 2025
2 parents 5adbbca + a1ef65f commit f64cfb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pantograph/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from abc import abstractmethod
import time
from dataclasses import dataclass
from typing import Optional, Self, List
from typing import Optional, List
import collections, unittest
from math import log, sqrt
from pantograph.server import Server, TacticFailure, ServerError
Expand All @@ -13,10 +13,10 @@
class SearchState:

goal_state: GoalState
parent: Optional[Self]
parent: Optional["SearchState"]
parent_goal_id: Optional[int]
priorities: list[float]
children: Optional[List[Self]] = None
children: Optional[List["SearchState"]] = None
tested_tactics: Optional[List[Tactic]] = None
total_value: Optional[float] = None
tactic_feedback: Optional[str] = None
Expand Down
2 changes: 1 addition & 1 deletion pantograph/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def run(self, cmd, payload):
:meta private:
"""
assert self.proc
s = json.dumps(payload)
s = json.dumps(payload, ensure_ascii=False)
self.proc.sendline(f"{cmd} {s}")
try:
line = self.proc.readline()
Expand Down

0 comments on commit f64cfb8

Please sign in to comment.