ksobon / Mandrill

data visualization for Dynamo
30 stars 15 forks source link

Script error with Report Window #4

Closed dietervermeulen closed 8 years ago

dietervermeulen commented 8 years ago

When running the script with the Report Window, I get a Script error (see screen shots) and at the end the window is empty. image image image

josols commented 8 years ago

Same with me. Win 7, dynamo 1.1 for Revit.

ksobon commented 8 years ago

@dietervermeulen and @josols here's a link to Mandrill Primer that explains how the data needs to be structured for Parallel Coordinates Chart. https://konradsobon.gitbooks.io/mandrill-primer/content/parallelCoordinates.html

Here's your sample re-worked to match that structure.

image

image

Good luck!

dietervermeulen commented 8 years ago

Hi Konrad, Thanks for indicating the solution with the names. But still the scripting error remains. image

ksobon commented 8 years ago

can you do two things for me?

  1. check if that path that is being mentioned in the error actually points at the d3.v3.min.js file.
  2. just click yes, and then right click in the empty window and click on View Source. Can you post the source code from that window?
dietervermeulen commented 8 years ago
  1. The path exists yes. image
  2. Source code: in attachment below. Source Code.txt

PS: Executed in Dynamo Studio 2017

ksobon commented 8 years ago

OK, so the script looks just fine, and if the file exists I can only suggest one more thing. Please try closing Studio and firing it up in Dynamo Sandbox. That's the version that I am testing on. I did run into this issue before when firing up Mandrill from Revit, but found no solution yet. Here's a link to my conversation with Dynamo dev team: https://github.com/DynamoDS/DynamoRevit/issues/1143

Ps. I tested that file trying to launch it from Dynamo inside of Revit and it fails for me as well. I still have no idea why it won't work when launched from within Revit but works just fine in Sandbox.

dietervermeulen commented 8 years ago

Does not work in any of the versions: Revit Dynamo, Dynamo Sandbox or Dynamo Studio (the last one is in fact now also the Dynamo Core which is the same as the Sandbox.)...

ksobon commented 8 years ago

it seems to be working in at least one of these versions: image

I know it has an issue with running on top of Revit. I am looking at that. I don't have Studio so I can't test on that.

dietervermeulen commented 8 years ago

Which is exactly the version I use :-) Sorry, but not working in the Sandbox version on my machine over here. Could it be related to Javascript version?

ksobon commented 8 years ago

OK, I will keep this issue open, but I am not sure how I can debug your issue without being able to re-create it.

I am on Win7 at work and Win10 at home so operating system is probably not an issue. I guess that it has to do with what app owns the window which in turn sets the context for data. I will try looking at that if I hear from more people that they can't get it to work on their machines.

ricardyn commented 8 years ago

The same happens with me.

ricardyn commented 8 years ago

@ksobon the problem can be the path? Because the file is on the correct place.

image

image

ksobon commented 8 years ago

@ricardo7cordas that's not an issue. That's an error that is being thrown for every exception that happens inside of d3.js I checked that the path is fine, and it was escaped inside of code so the actual path doesn't have %20 in it but a space. Please see the TXT attached by @dietervermeulen in above comment. I have no idea what causes that error and I have very little to go on here. Sorry.

ricardyn commented 8 years ago

Ok @ksobon . Thanks for your effort

plindjo commented 8 years ago

Hi Konrad. I am unfortunately experiencing the same issue with all charts. I've tested with sandbox and revit on win7 enterprise and win10 home, and got the script error with every setup (d3 is undefined). Since you can't recreate the issue, I thought it might be some weird reference issue or something, and figured I'd try building the package from the source. Unfortunately the Mandrill_d3 project will not compile since the parallelCoordinatesChart.html is missing from the repo. If you can add it, I will try to investigate further :-) Cheers Peter

ksobon commented 8 years ago

I think I know what the issue is. I am using a WebBrowser control to render these charts and in all its greatness its no different than using an IE7 which might or might not work on each individual person's computer depending on their own setup. Also, i found that WebBrowser control usually has trouble and unpredictable behavior when it comes to using local resources (d3.js) and it frequently denies access to these resources. I need to implement a different web browser and preferably one based on Chrome or FireFox. Currently I am looking into things like CefSharp, Awesomium and EO.WebBrowser. I will let you guys know when I have figured out which of these will fix the issue here. Thanks for the patience.

ksobon commented 8 years ago

OK, I tested my assumption using a EO.WebBrowser which uses Chrome and it turns out that I was correct. I can get my charts working now, in Sandbox and Revit without any errors. It turns out that It was about security restrictions and how browsers disable any website javascripts from accessing local files. What is possible with the EO browser is that it allows you to disable that and access the local d3.js files. Also it would mean consistency since it will no longer be dependent on what IE browser is installed on user computer since EO chrome browser would be distributed with Mandrill as a DLL file.

There is one small issue though. EO charges $700 for a license. Without it, it works but will show a little window in the corner of the screen: image

It's not actually embedded in the chart window, and you can move your chart to a different screen so its not a big deal, but still just slightly annoying.

Let me know what you guys think. I will post an update with this new browser solution for you all to test. Feedback is welcome.

plindjo commented 8 years ago

Great job! Looking forward to trying it out

dietervermeulen commented 8 years ago

Sounds good to me too, as long as their are no legal issues with this use of the license?

Op 27 sep. 2016 om 17:40 heeft Konrad K Sobon notifications@github.com<mailto:notifications@github.com> het volgende geschreven:

OK, I tested my assumption using a EO.WebBrowser which uses Chrome and it turns out that I was correct. I can get my charts working now, in Sandbox and Revit without any errors. It turns out that It was about security restrictions and how browsers disable any website javascripts from accessing local files. What is possible with the EO browser is that it allows you to disable that and access the local d3.js files. Also it would mean consistency since it will no longer be dependent on what IE browser is installed on user computer since EO chrome browser would be distributed with Mandrill as a DLL file.

There is one small issue though. EO charges $700 for a license. Without it, it works but will show a little window in the corner of the screen: [image]https://cloud.githubusercontent.com/assets/529781/18880749/fbd957f6-84a6-11e6-9a4b-bd946aab016a.png

It's not actually embedded in the chart window, and you can move your chart to a different screen so its not a big deal, but still just slightly annoying.

Let me know what you guys think. I will post an update with this new browser solution for you all to test. Feedback is welcome.

You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ksobon/Mandrill/issues/4#issuecomment-249904315, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALiSuY0dZuGPpZocaJP9BYV5Njf8jgL1ks5quTjigaJpZM4KChnc.

ksobon commented 8 years ago

I would rather purchase the license and then it states that its perfectly legal to ship their DLLs with the application. I am sure its OK to ship the free version as well but the pop-up is annoying.

I need to raise some founds for this. I don't think I want to start investing $$$ and time into my Open Source projects...

andydandy74 commented 8 years ago

kickstarter

ksobon commented 8 years ago

latest release should address issues raised here

image

ricardyn commented 8 years ago

the error continues, even after the update.

image

image

ksobon commented 8 years ago

Ricardo, try the chrome window node. This one didnt change.

ricardyn commented 8 years ago

wow.. thats great.. it works!!!

after the second run of the same graph, the little EO Browser window does not appear.. this is fine to me.

image

ksobon commented 8 years ago

Now i need to somehow solicit $700 to make the small window in bottom right corner go away. Lol. Glad it works for you.

ricardyn commented 8 years ago

We will ask for donations. I do advertising here with the guys from Brazil if necessary. And also contribute with $$$. This is an amazing job.

ksobon commented 8 years ago

I was thinking about starting a small fundme.com project so people can contribute. Lol. I will set something up. I need to fix a few more bugs and i will set that up. Thanks for the offer!

ricardyn commented 8 years ago

Let's do it.

dietervermeulen commented 8 years ago

Works fine now ! Great job Konrad.

ksobon commented 8 years ago

Here's a link to a fund if you guys want to contribute: https://funds.gofundme.com/dashboard/mandrill

Thanks!