ltzheng / Synapse

[ICLR 2024] Trajectory-as-Exemplar Prompting with Memory for Computer Control
https://ltzheng.github.io/Synapse/
MIT License
48 stars 9 forks source link

Windows fix #7

Closed ARajgor closed 7 months ago

ARajgor commented 7 months ago

fix #5

Squash and merge. tested in windows and macos.

1) Fix the window placement issue. now it works on any size of screens. 2) Fix the URL file path for miniwob. there is a bug in urlparse.urljoin()

MINIWOB_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)), "html", "miniwob"
)
MINIWOB_DIR = 'Projects\Synapse\synapse\envs\miniwob\html\miniwob'
subdomain='book-flight'
self.url = urlparse.urljoin(base_url, "{}.html".format(subdomain))
self.url = 'Projects\Synapse\synapse\envs\miniwob\html\book-flight.html'

so the urljoin remove the last miniwob from the base_url. I add '\' to the end.

ltzheng commented 7 months ago

Thanks. LGTM