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

jquery.js:1496 Uncaught Error: Syntax error, unrecognized expression #42

Open
rgaiacs opened this issue Oct 20, 2017 · 0 comments
Open

Comments

@rgaiacs
Copy link

rgaiacs commented Oct 20, 2017

When I load

$ cat applications.csv 
Name,Gender,Home institution,Career Stage
A,Male,X (Y-Z),Phase 2
B,Female,U1,Phase 2
C,Male,U2,Phase 3
D,Male,U3,Phase 3

and try to run entrofy I got

jquery.js:1496 Uncaught Error: Syntax error, unrecognized expression: .target#Home institution_X (Y-Z)
    at Function.ga.error (jquery.js:1496)
    at ga.tokenize (jquery.js:2113)
    at ga.select (jquery.js:2517)
    at Function.ga [as find] (jquery.js:893)
    at m.fn.init.find (jquery.js:2733)
    at new m.fn.init (jquery.js:2850)
    at m (jquery.js:73)
    at p:255
    at Array.map (<anonymous>)
    at get_targets (p:253)

as a Javascript error. The error is only visible at the web browser developer console which made me think if the software was working (I will create another issue for this).

I changed applications.csv to be

Name,Gender,Home institution,Career Stage
A,Male,X Y-Z,Phase 2
B,Female,U1,Phase 2
C,Male,U2,Phase 3
D,Male,U3,Phase 3

and I got a different error:

Traceback (most recent call last):
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1997, in __call__
    return self.wsgi_app(environ, start_response)
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1985, in wsgi_app
    response = self.handle_exception(e)
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1540, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/raniere/anaconda3/lib/python3.5/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/raniere/SSI/src/entrofy/app/server.py", line 53, in sample
    pre_selects)
  File "/home/raniere/SSI/src/entrofy/app/entrofy.py", line 202, in process_table
    score, rows = entrofy(X, k, q=np.asarray([float(_) for _ in q]),
  File "/home/raniere/SSI/src/entrofy/app/entrofy.py", line 202, in <listcomp>
    score, rows = entrofy(X, k, q=np.asarray([float(_) for _ in q]),
TypeError: float() argument must be a string or a number, not 'NoneType'

Hypothesis

Special characters in the values of some column is creating Javascript issues. So far, I had problems with (, ) and /.

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

1 participant