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

Python 3.6 Local Mode breaks due to usage of pathlib.Path and sqlite3 #1502

Closed
HeardACat opened this issue Apr 25, 2021 · 0 comments · Fixed by #1504
Closed

Python 3.6 Local Mode breaks due to usage of pathlib.Path and sqlite3 #1502

HeardACat opened this issue Apr 25, 2021 · 0 comments · Fixed by #1504

Comments

@HeardACat
Copy link
Contributor

HeardACat commented Apr 25, 2021

Expected Behavior

Python 3.6 in local mode works when following the quickstart

Current Behavior

Unable to follow quickstart due to the error as shown below

Steps to reproduce

  1. Create a Python 3.6 environment. E.g. conda create --name=feast36 python=3.6
  2. Install feast and other deps pip install feast
  3. Follow the quickstart

When running the quick start it will fail with the following msg.

(feast36) ➜  temp_feat$ feast init feat1

Creating a new Feast repository in /home/user/Documents/temp_feat/feat1.

(feast36) ➜  temp_feat$ cd feat1
(feast36) ➜  feat1$ feast apply
Registered entity driver_id
Registered feature view driver_hourly_stats
Deploying infrastructure for driver_hourly_stats
Traceback (most recent call last):
  File "/home/user/anaconda3/envs/feast36/bin/feast", line 8, in <module>
    sys.exit(cli())
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/cli.py", line 160, in apply_total_command
    apply_total(repo_config, Path.cwd())
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/repo_operations.py", line 148, in apply_total
    partial=False,
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py", line 55, in update_infra
    conn = self._get_conn()
  File "/home/user/anaconda3/envs/feast36/lib/python3.6/site-packages/feast/infra/local.py", line 45, in _get_conn
    self._db_path, detect_types=sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES
TypeError: argument 1 must be str, not PosixPath

Specifications

  • Version: 3.6
  • Platform: Ubuntu 20.04, also tested on Ubuntu 18.05
  • Subsystem:

Possible Solution

The sqlite3 issue is resolved in Python 3.7 as shown here:
https://bugs.python.org/issue33496

A solution could be to add self._db_path = str(self._db_path) or similar in the infra/local.py file

I couldn't find a similar issue - in the case its resolved in an upstream commit...

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

Successfully merging a pull request may close this issue.

1 participant