Hi Harris,

Can you show the code that you're running? I'm having trouble following the
description.

Thomas

On 20 December 2017 at 06:23, Harris Joseph <[email protected]>
wrote:

>
> To avoid collisions on the server's filesystem, I am trying to upload csv
> files as strings directly into the python kernel using javascript and
> kernel.execute() after converting it to UTF-8 with 
> FileReader.readAsText().result.
> I have tested the javascript function and it consistently prints the entire
> file to the console if I put a console.log() inside the callback function
> where I call kernel.execute() and send it the same variable outputString
> that gets built into  var command = "dataString ='"+outputString+"'";
> before being passed to kernel.execute. I was doing this all inside a magic
> %%HTML cell with <script> tags , but moved everything except the input div
> out and put the script in its own %%javascript cell. At first I thought I
> just needed to set a timeout to make sure the file got completely
> converted, (I know it has a built in ready check i will get to that soon)
> but even 20s made no difference plus it still got printed in the console
> every time anyway. I'm not sure, but I thought Jupyter and Python 3 used
> UTF-8 by default, and (supposedly) that is the default, no parameter
> encoding that FileReader.readAsText() returns. This could also just be me
> being a javascript newb and missing something about the scope between the
> IPython.notebook.kernel and the callback function in my script inside the
> notebook. I have an old version with the same code here with the <script>
> tags, it's the same otherwise (i think). I'll post again in the morning.
>
> Thanks and goodnight!
>
>
> Harris
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/ea080396-e87a-4801-bdca-c09391d03f86%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/ea080396-e87a-4801-bdca-c09391d03f86%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOvn4qi0fMvYP79QP5B3Q_oB%2BeCyNdwtYTda50LSnZh-bhvwSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to