Comments (1)
Hi!
Looks like my lack of knowledge about handling various string encodings caught up to me!
After looking into this, the problem is with my Python code that handles incoming binary data from Java (i.e., AL models). I have it set to only convert using utf-8 (reference) - what I assumed would be ok for everything - causing it to fail when any latin characters are passed.
For a fix, I've added extra handling to use ISO-8859-1 as a fallback.
And to validate this, I looped thru all characters in utf-8, utf-16, and iso-8859-1 (thanks to this SO post) and checked whether Pypeline would throw an error when running: pyCommunicator.run(String.format("x='%s'", chr));
In each, only 5 failed, but they were due to unhandled syntax reasons (e.g., newline characters, single quote, backslash).
I've pushed the changes but will include this as part of the next release. For convenience, you can download an updated jar file: Pypeline.zip. I'm closing but feel free to let me know if you still have issues with it!
from anylogic-pypeline.
Related Issues (20)
- fromJson for an int[][] HOT 2
- Agent population to json issue HOT 2
- Pycommunicator not dragging onto the experiment page in anylogic HOT 2
- Reinforcment Learning HOT 1
- Error with setting up python subprocess (Macbook) HOT 2
- Python files missing HOT 1
- Issues with Python on Mac HOT 2
- "Run and Runresults are not defined" problem HOT 4
- Issue with reflectiveObjects HOT 2
- No able to open the model examples HOT 1
- Bug with Mac HOT 6
- Issue with AnyLogic 8.8.2 HOT 1
- Run Python scripts before each experiment run HOT 6
- jsonifier library error HOT 4
- Error during model creation in AnyLogic HOT 3
- Pypeline and AnyLogic Cloud HOT 3
- Unable to load a pickled object HOT 3
- Python and Anylogic Connection HOT 1
- Error in AnyLogic 8.8.5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anylogic-pypeline.