Message Boards Message Boards

0
|
5313 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

NotebookOpen[ ] failed with notebook in cloud?

Posted 3 years ago

According to here

I expected this to work:

File1 = NotebookOpen[ "https:/mydomain.mysite.com/Unite3-4.nb"]; 
SelectionMove[File1, All, Notebook] 
SelectionEvaluate[File1]

I also tried

NotebookOpen[ URL["https:/mydomain.mysite.com/Unite3-4.nb"]]

Returns $Failed

POSTED BY: Merve Temizer
3 Replies

In the cloud, NotebookOpen currently only works with files referring to existing cloud objects. So you could create a corresponding cloud object first:

CopyFile[URL["https://demonstrations.wolfram.com/data/001281/0004/PoissonDistribution/PoissonDistribution.nb"],
    CloudObject["mypoisson.nb"]]

Then you can apply NotebookOpen:

NotebookOpen["mypoisson.nb", "OpenInNewWindow"->True]

Controlling that separate notebook will only work to a certain degree in the cloud. SelectionMove is supported, but SelectionEvaluate is not (yet).

BTW, you can also use SystemOpen to open a particular URL or cloud object:

SystemOpen["https://demonstrations.wolfram.com/data/001281/0004/PoissonDistribution/PoissonDistribution.nb"]

That will just let the browser handle the file, which typically means it will trigger a download when given a raw notebook file.

There is work underway to support viewing notebooks at arbitrary URLs, without creating corresponding cloud objects first.

POSTED BY: Jan Poeschko
Posted 3 years ago

Answer1: Example fails too. I just pasted the code section you provide and delete the s of https and shift + enter in the cell. Am i doing something wrong?

Answer2:

https:/mydomain.mysite.com/Unite3-4.nb 

in the browser address bar shows a very long starting with

Notebook[{Cell[

text in the browser window.

POSTED BY: Merve Temizer
Posted 3 years ago

Does the example from the documentation work for you after changing http to https?

NotebookOpen["https://demonstrations.wolfram.com/data/001281/0004/PoissonDistribution/PoissonDistribution.nb"]

Does https:/mydomain.mysite.com/Unite3-4.nb work in a browser?

POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract