main

2023/01/02

D3.js load error

 The error is:

Access to XMLHttpRequest at 'file:///D:/project/my_project/templates/data.csv' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, isolated-app, chrome-extension, chrome, https, chrome-untrusted.

1) Go to the developer tools (F12 in the browser), then select the three dots in the upper right corner, and go to Settings.

Then, look for Sources, and disable the options:

  • "Enable JavaScript source maps"
  • "Enable CSS source maps"
2) Disable AdBlock.

My chrome does not have settings as approach 1. 
The second approach works on my computer.


In terms of file folder and file path, check this youtube: https://www.youtube.com/watch?v=0XWyw4mbGEM

No comments:

Post a Comment

How to Supercharge Your Python Classes with Class Methods

  How to Supercharge Your Python Classes with Class Methods | by Siavash Yasini | May, 2024 | Towards Data Science As we just mentioned, a c...