Yeah, both are python3. I got it working. It seemed to have to do with the underscore in the name. I looked at the bean-price code and the regex doesn't seem to allow for underscores in the module name.
On Tuesday, January 23, 2018 at 6:42:42 PM UTC-8, Martin Blais wrote: > > Are you running python3 setup.py install? > Are you using the same version of Python which runs bean-price? > > > On Tue, Jan 23, 2018 at 1:22 PM, keesjochem via Beancount < > [email protected] <javascript:>> wrote: > >> I'm having some trouble getting the morningstar source to work. I'm >> probably doing something stupid, but can't really find what, so maybe >> someone can give a pointer. >> I installed the library by cloning >> https://github.com/hoostus/beancount-price-sources.git and then running >> python setup.py install. >> >> But when I try to run the examples I get an error: >> >> $ bean-price -e 'USD:hoostus_sources.morningstar/etfs:XASX:VEU' >> >> usage: bean-price [-h] [-e] [-v] [-d DATE] [-i] [-u] [-c] [-a] [-s] [-n] >> >> [--cache CACHE_FILENAME] [--no-cache] [--clear-cache] >> >> sources [sources ...] >> >> bean-price: error: Invalid source >> "USD:hoostus_sources.morningstar/etfs:XASX:VEU" >> >> Any ideas? >> >> cheers, >> Kees >> >> On Tuesday, January 16, 2018 at 8:13:27 AM UTC-8, Martin Blais wrote: >>> >>> >>> https://bitbucket.org/blais/beancount/issues/210/add-option-to-set-default-price-source-for >>> >>> On Tue, Jan 16, 2018 at 11:11 AM, Martin Blais <[email protected]> wrote: >>> >>>> On Sun, Jan 14, 2018 at 9:28 PM, <[email protected]> wrote: >>>> >>>>> Thanks, and sorry if I didn't make this clear: I prefer not to use >>>>> commodity directives, so everything can be automatically picked up by >>>>> using >>>>> --undeclared with bean-price. >>>>> >>>>> It seems like the price source has been hardcoded to default to yahoo >>>>> if I'm not mistaken. So perhaps I'd have to do something like do some >>>>> parsing to automatically produce commodity directives, and then get >>>>> prices >>>>> on those? >>>>> >>>> >>>> There's no option to change the default at the moment, but one could >>>> easily be added. I think it should. >>>> >>>> >>>> >>>>> >>>>> >>>>> On Sunday, January 14, 2018 at 6:12:26 PM UTC-8, Martin Blais wrote: >>>>>> >>>>>> The commodity directive allows you to specify the price source. >>>>>> e.g. >>>>>> >>>>>> 2001-05-24 commodity XSP >>>>>> name: "iShares S&P 500 Index Fund (CAD Hedged)" >>>>>> assets: "Stock" >>>>>> price: "CAD:google/TSE:XSP" >>>>>> export: "TSE:XSP" >>>>>> quote: CAD >>>>>> >>>>>> So instead of "google/" here you'd use the name of the morningstar >>>>>> Python library. >>>>>> >>>>>> >>>>>> On Sun, Jan 14, 2018 at 8:51 PM, <[email protected]> wrote: >>>>>> >>>>>>> Thanks for this, very useful! A couple questions: >>>>>>> >>>>>>> 1) How do I get bean-price to use this by default? I don't use >>>>>>> commodity directives in my sources >>>>>>> >>>>>>> 2) Is there a way to automatically determine exchange and ticker >>>>>>> with morningstar so I don't have to manually find it for each ticker I >>>>>>> have? >>>>>>> >>>>>>> Thanks again for sharing this! >>>>>>> >>>>>>> On Sunday, December 10, 2017 at 5:21:07 AM UTC-8, >>>>>>> [email protected] wrote: >>>>>>>> >>>>>>>> I written a Morningstar price fetcher which I've been using for a >>>>>>>> few weeks: https://github.com/hoostus/beancount-price-sources >>>>>>>> >>>>>>>> One nice benefit (for me) is they aggregate multiple exchanges, >>>>>>>> especially non-US ones. >>>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "Beancount" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> To view this discussion on the web visit >>>>>>> https://groups.google.com/d/msgid/beancount/18853291-34f2-4efd-adee-e77edd66dd87%40googlegroups.com >>>>>>> >>>>>>> <https://groups.google.com/d/msgid/beancount/18853291-34f2-4efd-adee-e77edd66dd87%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>> . >>>>>>> >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Beancount" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/beancount/e377cf48-fb23-47ce-8f7c-d55cef5ed5be%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/beancount/e377cf48-fb23-47ce-8f7c-d55cef5ed5be%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Beancount" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beancount/2b62ee12-ddc3-4093-97be-aadb21387567%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beancount/2b62ee12-ddc3-4093-97be-aadb21387567%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/3b1c347b-f01f-4860-a5a0-001cb89f4228%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
