AirtestProject / AirtestProject/AirtestIDE

Airtest Custom Python Code - TypeError: cannot use a string pattern on a bytes-like object

Offen
#877 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
236
Forks
40
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello Airtesters!)
When I use Custom Python Path I have a strange Issue -

I spent 1 day to solve this problem, but I did not find a solution.

I've been changing the environment.
I tried to pass the path to the file as a byte-object.
I decoded the picture into base64.

`TypeError: cannot use a string pattern on a bytes-like object
`
![image](https://user-images.githubusercontent.com/72766918/101734378-39f70d00-3ad1-11eb-8294-aff155b26f34.png)

I have this Issue, when i use this commands:

`swipe([0.5, 0.8], [0.5, 0.3])`
`touch(Template(r"tpl1607583450288.png", record_pos=(0.004, -0.476), resolution=(1080, 2280)),times=1, duration=0.01)`

But This command works Currectly:

`exists(Template(r"tpl1607585362450.png", record_pos=(0.003, -0.459), resolution=(1080, 2280)))`
`wait(Template(r"tpl1607585510451.png", record_pos=(0.004, 0.476), resolution=(1080, 2280)))`

https://youtu.be/bN1sB8lFJtw - Airtest Python Example

https://youtu.be/jZZKrX6YE3s - The Same Code with Custom Python Path - TypeError

https://pastebin.pl/view/e4d67c59 - Error Log

[TypeError.zip](https://github.com/AirtestProject/AirtestIDE/files/5670887/TypeError.zip)

I look forward to your help, pleas

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.