Accessing json data in Mac

Hi Emmanuel

Some users of the Flow template are having an issue in Mac when accessing filesystem to load Json data. It works ok in Windows.
Some fixed it by launching the server via sudo with root rights.
Do you recognize this error?
Thanks

image

Since it works with root privileges, it could be a permission issue on the imported files

https://duckduckgo.com/?key=14aaeaeefd4cd79c42108d84b7704219fa17563912c8857eeffcdfdb31c7f9ebaf24c76eb39d3d7e2abcb86a71dd4f9ae680ab240db62d65162db94b74953461&q=set+files+permission+mac&atb=v86-6__&ia=web&iai=r1-0&page=1&sexp={"artexp"%3A"b"%2C"prodexp"%3A"b"%2C"prdsdexp"%3A"c"%2C"biaexp"%3A"b"%2C"msvrtexp"%3A"b"}

In my case all of these files are under the users home directory. I can confirm that all of the the imported files and all of its parent folders have read and write permissions for the user that runs the application. So that should be fine. I will dig some deeper...

@gidash The error stack is not very meaningful to me since it throws in your code (TypeError: etc). The object that's supposed to contain the "All_tracks_Hide_All" key is directly retrieved from a file ? How ?

Hello,
indeed the object is inside a JSON file, so the message means that he did not find or could not access the JSON file
when launching it with root instead it works ans so the file is accessed and used properly

I tripple checked.. the filesystem permissions of all the referred files are 777 (chmod 777) and are accessibel for the user under which the app runs. Yet the application says it cannot access those files. So it looks like a bug of Open Stage Control or the script running in it.

I'm a native MacOS developer maybe I can help, what is used as path string at the file open command?

@gidash:
Could you add code tot print the full path that is opened to the debug console at the same this error message is printed: "Impossible to find data, please make sure you copied flow json data in the right folder, refer to https://artificialharmonics.com/docs/flow-2-installation-guide/#import-data" and send me a new version of the javascript files.

How do you load this json file exactly ?

Hi Emmanuel,

Thanks to Bastiaan we could find the solution and it had nothing to do with open stage control.

  • in mac this will not work because of the presence of the file in the folder path while in windows it works "/Users/bastiaandewaard/Documents/Flow/Flow+/artificialharmonics.com_flow+_osc-data.json/../data/macros"
  • also in mac should use / while in windows \

so in the end the issue is solved and was only linked to the name of the folder and changes between the unix and windows way of declaring them

Marco

Ok cool then :slight_smile:

1 Like

OSC is wonderful :slight_smile: