joeyism / py-edgar

A small library to access files from SEC's edgar
GNU General Public License v3.0
227 stars 52 forks source link

AttributeError: module 'edgar' has no attribute 'Company' #4

Closed chrislakumb closed 5 years ago

chrislakumb commented 5 years ago

Anyone else running into this issue?

joeyism commented 5 years ago

Can you paste the code you're running that got you this error?

chrislakumb commented 5 years ago

import edgar company = edgar.Company("RiverNorth Marketplace Lending Corp", "0001644771") tree = company.getAllFilings(filingType = "N-23C3A") docs = edgar.getDocuments(tree, noOfDocuments=10) print (docs)

mackdelany commented 5 years ago

This worked on my machine, so it might be a local issue?

On Wed, Apr 3, 2019 at 8:23 PM chrislakumb notifications@github.com wrote:

import edgar company = edgar.Company("RiverNorth Marketplace Lending Corp", "0001644771") tree = company.getAllFilings(filingType = "N-23C3A") docs = edgar.getDocuments(tree, noOfDocuments=10) print (docs)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joeyism/py-edgar/issues/4#issuecomment-479624917, or mute the thread https://github.com/notifications/unsubscribe-auth/AQViYZgxW2EwCSURxnTmoag5eXrJ34xlks5vdP-ngaJpZM4cYuBp .

--

[image: photo]

Mack Delany

Business Development - North America

+1 929 202 6400 | mack@mish.guru | mish.guru http://www.mish.guru/ Watch the Georgetown Story https://www.youtube.com/watch?v=ziKwTAiIOKI&t=1s to see Mish Guru in action

https://www.snapchat.com/add/mishguru https://www.instagram.com/mishguru/ https://twitter.com/mishguru?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor

joeyism commented 5 years ago

It also works for my machine. Can you give more details about your machine? Py2 or 3, what is in the edgar package, etc?

newbie28 commented 5 years ago

It seems very likely that your script name is edgar.py - change it something else and it should work fine.

chrislakumb commented 5 years ago

That seems to have worked. I'm admittedly a Python novice, but I can't understand why the name of the file would interfere with the proper running of the program?

On Fri, Apr 19, 2019 at 9:37 AM newbie28 notifications@github.com wrote:

It seems very likely that your script name is edgar.py - change it something else and it should work fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joeyism/py-edgar/issues/4#issuecomment-484951646, or mute the thread https://github.com/notifications/unsubscribe-auth/AK55QE3O4UJMOQTYFDGS6DLPRHYODANCNFSM4HDC4BUQ .

joeyism commented 5 years ago

Python doesn't differential installed or local packages when importing. So if you have a file called edgar.py, when it runs import edgar, it's importing the local file and not the one you installed