Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Python3 compatible #9

Open
AbdealiLoKo opened this issue May 27, 2018 · 1 comment
Open

Python3 compatible #9

AbdealiLoKo opened this issue May 27, 2018 · 1 comment

Comments

@AbdealiLoKo
Copy link
Contributor

Seems like when I use the library, I get a lot of the following in my logs:

[E 19:06:06.771 NotebookApp] Uncaught exception GET /sparkmonitor/static/timeline-view.js (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/sparkmonitor/static/timeline-view.js', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/tornado/web.py", line 1499, in _stack_context_handle_exception
        raise_exc_info((type, value, traceback))
      File "<string>", line 4, in raise_exc_info
      File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/tornado/stack_context.py", line 315, in wrapped
        ret = fn(*args, **kwargs)
      File "/Users/abdealijk/anaconda3/lib/python3.6/site-packages/sparkmonitor/serverextension.py", line 68, in handle_response
        "location.origin", "location.origin +'" + self.replace_path + "' ")
    TypeError: a bytes-like object is required, not 'str'
[E 19:06:06.774 NotebookApp] {
      "Host": "localhost:8888",
      "Connection": "keep-alive",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36",
      "Accept": "*/*",
      "Referer": "http://localhost:8888/sparkmonitor/",
      "Accept-Encoding": "gzip, deflate, br",
      "Accept-Language": "en-US,en;q=0.9",
      "Cookie": "_ga=GA1.1.939770584.1522777592; username-localhost-8889=\"2|1:0|10:1524844138|23:username-localhost-8889|44:YTM2ZTA5MTY5ODBjNGZmYTlkMjU5NmMyZDg2ODMxZmI=|2a48a65b005e9bdee1e24a4998f5a0ecfa4403d19cd979a3999cd4c1cfc6d1e6\"; username-localhost-9990=\"2|1:0|10:1527410921|23:username-localhost-9990|44:YTYwOGU1YzY4Yjk1NDhkM2JhMWM0YzYxZTU5NTk4ZDA=|8e91be00c8de10fbb098a1e228d324a1a5d3437138d4f76b7bba04db0b159929\"; _xsrf=2|a8530e06|b62af1e2bf7923224299195c03d70803|1527410923; username-localhost-8888=\"2|1:0|10:1527427803|23:username-localhost-8888|44:YjQ1ZWRkYTE0ZjEyNDNhZGI3NDVlMmEzYjhiYmQ3Zjg=|b31f12794744caf6a4d3bdf59c5e8c64cd22c6d6c2a2e1f636fdbf92c69531f0\""
    }
[E 19:06:06.775 NotebookApp] 500 GET /sparkmonitor/static/timeline-view.js (::1) 14.24ms referer=http://localhost:8888/sparkmonitor/
SPARKMONITOR_SERVER: Request_path static/log-view.js
 Replace_path:/sparkmonitor

The bytes/str issue seems like a classic python2/python3 issue. Has this been tested with python3 ?

@krishnan-r
Copy link
Owner

Yes this is a python 2 vs 3 error. I am getting this too with a python 3 server.
IIRC this was tested with python 3, but only with the kernel as python 3, the notebook server was still in python 2. I shall fix this.

krishnan-r added a commit that referenced this issue May 29, 2018
Removed stray print statements in scala SparkListener.
krishnan-r added a commit that referenced this issue May 29, 2018
Removed stray print statements in scala SparkListener.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants