Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax Error in URL #7

Open
bartman0815 opened this issue Jul 4, 2017 · 2 comments
Open

Syntax Error in URL #7

bartman0815 opened this issue Jul 4, 2017 · 2 comments

Comments

@bartman0815
Copy link

When I use your simple 3 line code example:

import good_morning as gm
kr = gm.KeyRatiosDownloader()
kr_frames = kr.download('AAPL')

following failure appears:

$ python3 test.py
Traceback (most recent call last):
File "test.py", line 1, in
import good_morning as gm
File "/home/pi/good-morning-master/morningstar/good_morning.py", line 59
url = (ur'http://financials.morningstar.com/ajax/exportKR2CSV.html?' +
^
SyntaxError: invalid syntax

@dr333
Copy link

dr333 commented Jul 17, 2017

Encountered the same issue.

@linwoodc3
Copy link
Contributor

I think I figured out the fix @petercerno. Somehow, during the last push I sent, the urls beginning with r'https......... got replaced with ur'https:.......... Or, in simpler terms, a u got put on each string.

And then another problem comes with urllib2 (I don't remember doing this and didn't see it in my commits..but it's there).

I found a way to fix both of them (just return text back to Peter's Nov 2015 commit). I'll make the changes and do the pull request

This new pull request will also close #6

@linwoodc3 linwoodc3 mentioned this issue Jul 23, 2017
linwoodc3 added a commit to linwoodc3/good-morning that referenced this issue Jul 23, 2017
… and exception handling for passing empty string and invalid ticker symbol
linwoodc3 added a commit to linwoodc3/good-morning that referenced this issue Jul 23, 2017
…ling, adds unittests, and includeds contin. integration tests for Windows, Linux, OSX.
linwoodc3 added a commit to linwoodc3/good-morning that referenced this issue Jul 23, 2017
commit c1fcdae
Merge: fde97ac fd73447
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 14:08:59 2017 -0400

    Merge branch 'urlFix_linwoodError' of https://github.com/linwoodc3/good-morning into urlFix_linwoodError

commit fde97ac
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:28:18 2017 -0400

    Fixes petercerno#6 and petercerno#7 url problems, adds exception handling, adds unittests, and includeds contin. integration tests for Windows, Linux, OSX.

commit fd73447
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:36:25 2017 -0400

    Fixing the travis ci build. # 17

commit f58f591
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:17:00 2017 -0400

    Fixing the travis ci build. # 16

commit fcc539a
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:06:44 2017 -0400

    Fixing the travis ci build. # 15

commit 6fc4e9f
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:55:46 2017 -0400

    Fixing the travis ci build. # 14

commit 6d04c78
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:40:49 2017 -0400

    Fixing the travis ci build. # 13

commit a280acf
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:20:20 2017 -0400

    Fixing the travis ci build. # 12

commit 57abfd1
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:12:17 2017 -0400

    Fixing the travis ci build. # 11

commit 536ec5d
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:51:13 2017 -0400

    Fixing the travis ci build. # 9

commit 7e8a6d7
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:39:51 2017 -0400

    Fixing the travis ci build. # 8

commit 7e95db7
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:33:16 2017 -0400

    Fixing the travis ci build. # 7

commit d97535a
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:23:15 2017 -0400

    Fixing the travis ci build. # 6

commit 7b48720
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:19:08 2017 -0400

    Fixing the travis ci build. # 5

commit 64f6f12
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:09:12 2017 -0400

    Fixing the travis ci build. # 4

commit c8501e9
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:56:42 2017 -0400

    Fixing the travis ci build. # 3

commit 7853d38
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:50:37 2017 -0400

    Fixing the travis ci build. # 2

commit 9a00fbf
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:47:04 2017 -0400

    Fixing the travis ci build.

commit 3df0634
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:28:18 2017 -0400

    Fixes petercerno#6 and petercerno#7 url problems.  Also adds unit test and exception handling for passing empty string and invalid ticker symbol
linwoodc3 added a commit to linwoodc3/good-morning that referenced this issue Jul 23, 2017
commit c1fcdae
Merge: fde97ac fd73447
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 14:08:59 2017 -0400

    Merge branch 'urlFix_linwoodError' of https://github.com/linwoodc3/good-morning into urlFix_linwoodError

commit fde97ac
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:28:18 2017 -0400

    Fixes petercerno#6 and petercerno#7 url problems, adds exception handling, adds unittests, and includeds contin. integration tests for Windows, Linux, OSX.

commit fd73447
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:36:25 2017 -0400

    Fixing the travis ci build. # 17

commit f58f591
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:17:00 2017 -0400

    Fixing the travis ci build. # 16

commit fcc539a
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 13:06:44 2017 -0400

    Fixing the travis ci build. # 15

commit 6fc4e9f
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:55:46 2017 -0400

    Fixing the travis ci build. # 14

commit 6d04c78
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:40:49 2017 -0400

    Fixing the travis ci build. # 13

commit a280acf
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:20:20 2017 -0400

    Fixing the travis ci build. # 12

commit 57abfd1
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 12:12:17 2017 -0400

    Fixing the travis ci build. # 11

commit 536ec5d
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:51:13 2017 -0400

    Fixing the travis ci build. # 9

commit 7e8a6d7
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:39:51 2017 -0400

    Fixing the travis ci build. # 8

commit 7e95db7
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:33:16 2017 -0400

    Fixing the travis ci build. # 7

commit d97535a
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:23:15 2017 -0400

    Fixing the travis ci build. # 6

commit 7b48720
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:19:08 2017 -0400

    Fixing the travis ci build. # 5

commit 64f6f12
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 11:09:12 2017 -0400

    Fixing the travis ci build. # 4

commit c8501e9
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:56:42 2017 -0400

    Fixing the travis ci build. # 3

commit 7853d38
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:50:37 2017 -0400

    Fixing the travis ci build. # 2

commit 9a00fbf
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:47:04 2017 -0400

    Fixing the travis ci build.

commit 3df0634
Author: Linwood Creekmore III <[email protected]>
Date:   Sun Jul 23 10:28:18 2017 -0400

    Fixes petercerno#6 and petercerno#7 url problems.  Also adds unit test and exception handling for passing empty string and invalid ticker symbol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants