For this to work, make sure you are running a local server! I cover how to do this with node.js here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FjWbUK2HdCo.html
Hello I am facing a problem I try to load csv file and when i update the csv file and refresh my browser the data can't updated unless I refresh the browser by ctrl f5
@@choudharyusama7474 He's using a cool extension in vscode called Live Server marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer Which is making it so that it's a live reload. Hope that helps! :)
You know what? I'll come to the video and content later, Firstly I want to say you are such a nice person. It's like you are enjoying work and always happy and in a jolly mood. That makes learning fun. Thank you for making JavaScript interesting. Also, the content is so good and the videos are so interesting. Thankyou.
I love that you break down everything so simply and show implementation using code. You make learning this stuff a lot easier than it was for me in college. Let alone you've taught me more!
Hello, I couldn't leave a message of congratulations for you. Simply the best. Direct, clear, didactic and simply outstanding. Watching everything from here in Brazil.
Dan, thank you a lot for this great video. I love the way you teach. Instead of publishing videos where everything goes perfect, you make mistakes and correct them. Actually, that is the way how people learn things.
is that the dan that i knew who always made mistakes? I don't know when you got so professional but it looks really cool and the production and editing were at another level. sooooo kudos to you!
For handling/ removing the header Instead of using slice just start the 'for loop' at 1 and you will not add extra processes to the code. I am just an amateur and not trying to critique your work just making an observation while learning from you many other things I have yet to put together. Mr. Shiffman, Thanks for the great learning tools you provide.
Oh Yes I totally get your point sir! good one, also we might notice that he later went on to user forEachLoop which start from the first element. :) , but the way you described it is also a nice alternative I must say,
My fetch isn't working. Every time it says the following error: Try.html:10 Fetch API cannot load file. URL scheme must be "http" or "https" for CORS request. Any help would be welcome🤧👍🏼
maybe this is a little too late to be answering, but to who it may concern... it needs to be hosted on a live server somewhere for the Fetch API to work correctly. Instead of opening on default browser, you can install 'Live Server' (a VSCode extension) and open it with that! :)
Thank you so much sir. Your video on api and fetch() helped me to complete my project. You have explained it so nicely and in simple way for beginners. 😍
Wow, i used to work with data like this in Python when i'm working with my ML and DL projects back then. Now i want to learn javascript and vuejs for my website projects, and guess what. I'm learning data manipulation again here in another concepts of language. Hahaha thank you, sir! :)
Absolutely awesome! However, I lost an hour before I realized I had to Disable Same Origin Policy to get rid of the browser error I was getting. The sequence to do this : about:config -> security.fileuri.strict_origin_policy -> false
I paused the video at 3:50. It took me 2hours and 45 mins to do it myself. I created functions that create a table and inject the headings and data. So noob :'D but progress!
Hey Dan, I don't see the solution for getting multiple files in the git repo. I'm also not sure if you want us to fetch a directory of images and then display those, or just create two fetch commands for unique files. One is simple, the other I can't solve. Thanks for another enjoyable, informative video :)
question: where do javascript variables live anyways? are they maybe allocated in a ram reserved for the bowser's tab, or separately? is there a limit to how much % of ram one tab can occupy, or can it take the whole ram or maybe be even stored on a hard drive if it needs be? is the transfer of the data from/to ram to/from browser slower than the transfer of the data from/to ram to/from desktop app would be, like say python ide? also: is this csv file fetched only once, or is it being fetched repeatedly?
What if your CSV strings contain newline character or comma character in the data then splitting based on those characters will lead to unexpected results
I couldn't able to use fetch(). Getting error in console on CORS. I tried to remove CORS its not worked for me. How to read local file using fetch. Could you please any one help me? Thanks in advance
I was following along, but I was wondering why my temp data was different than yours? Example, 1880 , -.19 and 1881, -.10: Your set shows 1880, -.18 and 1881, -.09 ???
Hello Code train, thanks for all your presentations they are interesting and educative. I got an error when trying to load the csv on console.log ( Fetch API cannot load file:/// URL scheme must be "http" or "https" for CORS request. getData @ index.html:18
@@techzee9000 yes, I use Visual Studio Code and installed the extension Live Server (see here ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-y4qqQeUDCBQ.html) Right click on the repository and open with Live Server. Good Luck!
hello sir ,, can we fetch data direct from fetch("htttps://xyz") withoout saving in our cvs file in code editor,,if yes how can i do this? please reply
i think not, you probably need a proxy. Like for the image in the last video i tried to get it online and CORS yelled at me XD so i researched it and it happened to be that you need another server to serve you the info that youre requesting from the other server. Look up "CORS anywhere" and try it with that.
I want user of my website to be able to upload data and make have option to make different type of charts. I am researching on that, any idea how to achieve that.
hi coding train...i have a hard time to fetch the csv file...the console always show fetch api cannot load eventhough i save it in the same file directory...can you tell me how to fix this...
Would "const table = await response.text().split(' ').slice(1);" be a bad idea? Thinking that it might be nice to do splitting and slicing asynchronously if the file is huge.
I'm getting a cannot find variable error for Chart in the myChart function that displays the table idk why, its declared as a new variable so idk why and tried to call it as a global variable but still doesn't work. Any recommendations?
Hi, I am using this.props.history.push({ pathname:`some path`, state:{ object :object} }) ; on handleSubmit click And reading the data into routed component like this.props.location.state.objectName.field This is working fine when I am using BrowserRouter even when i refresh the page i get the values on page BUT when I am using Hashrouter and I refresh the page I get error saying Can not read properties of undefined Please help
Fetch Api cannot load the url Url scheme file is not supported error
5 лет назад
Do i need some import function or something? This fetch method throws me an error "index.html:15 Fetch API cannot load file:////////test.csv. URL scheme must be "http" or "https" for CORS request." Pls help
For this to work, you need to be running a local server! I should have made this more clear, see: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FjWbUK2HdCo.html
how do i just download this csv i cant seem to do that of github to practice with it.... or any csv for that matter... i cant fetch locally like he did in this tutorial. stupid question but still ! fetch('test.csv') wont work even if i have the file locally
@@maxdegreat566 you save it there but you need to open a local/live server from your text editor and it should work. Or get the link to the info and use a proxy like "CORS anywhere" to get the data.
A few people ask how to get it from the remote url. While not pretty, using a middle service that adds the needed cors is one way. fetch('cors-anywhere.herokuapp.com/data.giss.nasa.gov/gistemp/tabledata_v4/ZonAnn.Ts+dSST.csv');