<div dir="ltr">Hello,<div><br></div><div>Tickers with - get error when trying to download ZB-PA but not ZBK.</div><div><br></div><div>When I manually download it from Yahoo I get this link, that works.</div><div><br></div><div><div><a href="http://real-chart.finance.yahoo.com/table.csv?s=ZB-PA&a=00&b=2&c=2015&d=01&e=23&f=2015&g=d&ignore=.csv">http://real-chart.finance.yahoo.com/table.csv?s=ZB-PA&a=00&b=2&c=2015&d=01&e=23&f=2015&g=d&ignore=.csv</a></div><div><br></div><div>The Quantmod tried to download from this link, which does not exist.</div><div><a href="http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&">http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&</a><b>q=q&y=0&z=ZB-PA&x</b>=.csv</div><div><br></div><div>If this part could be replaced "q=q&y=0&z=ZB-PA&x" with "d&ignore" and it will work both with ZB-PA and ZBK.<br></div><div><br></div><div>Maybe this forum is not the correct place to suggest this improvement, please point me in right direction.</div><div><br></div><div>Maybe someone can help me out to fix this script error?</div><div>My script stop writing to the database if one of these tickers get this error described above (no data exist for symbol ZB-PA to be stored in the database. Anyone know how to ignore tickers that get this error so the script can continue to load all tickers that has downloaded data?</div><div><br></div><div>Please find attached scripts.</div><div><br></div><div>Error when trying to download ticker data from Yahoo Finance for ZB-PA.</div><div><br></div><div>=================================</div><div><i>"Downloading ZB-PA</i><br></div><div><i>Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  : </i></div><div><i>  cannot open URL '<a href="http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&q=q&y=0&z=ZB-PA&x=.csv">http://ichart.finance.yahoo.com/table.csv?s=ZB-PA&a=0&b=01&c=2015&d=1&e=24&f=2015&g=d&q=q&y=0&z=ZB-PA&x=.csv</a>'</i></div><div><i>In addition: Warning message:</i></div><div><i>In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :</i></div><div><i>  InternetOpenUrl failed: 'The operation timed out'</i></div><div><i>, error - did not download (likely due to rate limiting</i></div><div><i>Downloading ZBK</i></div><div><i>Warning message:</i></div><div><i>In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :</i></div><div><i>  downloaded length 1653 != reported length 200</i></div><div><i>> View(clean.symbols)</i></div><div><i>> "</i></div><div>=============================</div><div><br></div><div><div>========================================</div><div>> # Save data to MySQL</div><div>> </div><div>> library(RMySQL)</div><div>> </div><div>> con <- dbConnect(RMySQL::MySQL(), host="localhost", user="donedge",password="p@ssw0rd", dbname= "daily")</div><div>> </div><div>> # Loop through each symbol</div><div>> </div><div>> for (i in 1:nrow(clean.symbols)){</div><div>+   symbol <- clean.symbols[i,]$Symbol</div><div>+   df = data.frame(Date=index(get(symbol)), coredata(get(symbol)))</div><div>+   setNames(df,c("Date","Open","High","Low","Close","Volume","Adjusted"))</div><div>+   </div><div>+   cat("Storing",symbol,"\n")</div><div>+   </div><div>+   if(dbExistsTable(con, symbol)){</div><div>+     dbRemoveTable(con, symbol)</div><div>+   }</div><div>+   </div><div>+   dbWriteTable(con, name=symbol, value=df, row.names=FALSE, overwrite = TRUE)</div><div>+   </div><div>+ }</div><div><b>Error in get(symbol) : object 'ZB-PA' not found</b></div><div>> </div></div><div>========================================</div><div><br></div><div>Kind Regards</div><div>Isak</div></div></div>