0

i am trying to download some stock data. pretty easy code:

import quandl
import numpy as np


data = quandl.get("FSE/ADS_X",authtoken='xxx',  collapse="monthly")
print(data.head(20).to_string())

when i run this in eclipse, it says

AttributeError: module 'quandl' has no attribute 'get'

running this in the cmd, it works perfectly fine. my eclipse project is looking a C:\Users\user\Anaconda3\python.exe. this python installation can use quandl in the cmd.

any ideas? thanks!!

Ele
  • 523
  • 2
  • 6
  • 19
  • 1
    Any chance you're masking the real quandl module by a directory with the same name? – Pavel Dec 18 '17 at 19:52
  • @Pavel ahh i See. May Script is also called quandl! Thanks :) – Ele Dec 19 '17 at 06:58
  • Possible duplicate of [Importing installed package from script raises "AttributeError: module has no attribute" or "ImportError: cannot import name"](https://stackoverflow.com/questions/36250353/importing-installed-package-from-script-raises-attributeerror-module-has-no-at) – SiHa Dec 19 '17 at 19:22

1 Answers1

-1

My program was called quandl.py as well so renaming solved the issue.

Servy
  • 202,030
  • 26
  • 332
  • 449
Ele
  • 523
  • 2
  • 6
  • 19
  • @Rabbid76 what? So shall i Leave the question open since the answer is a comment?? – Ele Dec 19 '17 at 20:12