Skip to content

Commit 64a9d10

Browse files
closes clearloop#79 fixed python script support (clearloop#134)
1 parent 05e1880 commit 64a9d10

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/pym.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use pyo3::prelude::*;
77

88
/// Exec python scripts as filter
99
pub fn exec(module: &str) -> Result<Vec<String>, crate::Error> {
10+
pyo3::prepare_freethreaded_python();
1011
let script = load_script(&module)?;
1112
let cache = Cache::new()?;
1213

@@ -20,7 +21,7 @@ pub fn exec(module: &str) -> Result<Vec<String>, crate::Error> {
2021
let stags = serde_json::to_string(&cache.get_tags()?)?;
2122

2223
// ret
23-
let res: Vec<String> = pym.call1("plan", (sps, stags))?.extract()?;
24+
let res: Vec<String> = pym.getattr("plan")?.call1((sps, stags))?.extract()?;
2425

2526
Ok(res)
2627
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy