gregsexton / ob-ipython

org-babel integration with Jupyter for evaluation of (Python by default) code blocks
737 stars 111 forks source link

async execution fails when a line of code is greater than 4,095 characters in length #218

Open noprobelm opened 3 years ago

noprobelm commented 3 years ago

I ingest variables from org-mode tables using org properties and ob-ipython. Today, the length of my table (a list of lists) along with the variable declaration statement exceeded 4,096 characters and the line of code ceased being interpreted after the 4,095th character, which resulted in a SyntaxError. Reducing the line of code to 4,095 characters allowed for the entire statement to be interpreted, eliminating the error.

Steps to recreate:

This problem is seemingly repeatable with any sort of statement. Another example of problem recreation would be to print a string that results in the entire statement exceeding 4,095 characters.

For example, print("<4086 characters>") will successfully execute since the entire line of code is 4,095 characters in length. Likewise, print("<4087 characters>") will fail because the line of code is 4,096 characters in length.