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

Exception becuase of missing math package #4

Closed
hcarter333 opened this issue Jan 25, 2024 · 2 comments
Closed

Exception becuase of missing math package #4

hcarter333 opened this issue Jan 25, 2024 · 2 comments

Comments

@hcarter333
Copy link
Owner

Getting the following from pytest:

Traceback (most recent call last):
  File "/home/hcarter333/datasette-haversine-point-path/datasette_haversine_point_path/__init__.py", line 36, in haversine_point_path_sql
    tx_x = cartesian_x(lat1,lon1)
  File "/home/hcarter333/datasette-haversine-point-path/datasette_haversine_point_path/__init__.py", line 7, in cartesian_x
    return (math.cos(f*deg2rad)*math.cos(l*deg2rad))
NameError: name 'math' is not defined

I'll add the path and I'll also add the dependeny to pyproject.toml.

hcarter333 added a commit that referenced this issue Jan 25, 2024
@hcarter333
Copy link
Owner Author

math package now found. The new issue is that my 'constant' deg2rad is missing.

hcarter333 added a commit that referenced this issue Jan 25, 2024
@hcarter333
Copy link
Owner Author

That fixed this issue.

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