scanner-research / scanner

Efficient video analysis at scale
https://scanner-research.github.io/
Apache License 2.0
620 stars 108 forks source link

ImportError: cannot import name 'Database' #285

Open DavidDoukhan opened 5 years ago

DavidDoukhan commented 5 years ago

Dear maintainers,

I'm trying to test scanner framework, and I'm facing some difficulties. It seems I cannot import the "Database" class, which is used in many files I found in examples/apps

Using the following lines of code:

from scannerpy import DeviceType, Job
from scannerpy import Database

I get this error message:

ImportError                               Traceback (most recent call last)
<ipython-input-4-20f54f22a0ce> in <module>()
      1 from scannerpy import DeviceType, Job
----> 2 from scannerpy import Database

ImportError: cannot import name 'Database'

Here are more details on my installation:

Ubuntu 16.04.6 LTS
Docker version 18.09.7, build 2d0083d

I installed scanner using the following commands:

pip install --upgrade docker-compose
wget https://raw.githubusercontent.com/scanner-research/scanner/master/docker/docker-compose.yml
docker-compose run --service-ports cpu /bin/bash

I finally launched jupyter using the following command: docker-compose up cpu

I managed to launch examples/Walkthrough.ipynb and also managed to lauch program apps/walkthroughs/grayscale_conversion.py

Any idea?

Kind regards,

willcrichton commented 5 years ago

Hi @DavidDoukhan, some of the examples in the apps directory are a little out of date. In this case, Database was renamed to Client. Anything linked from the scanner.run webpage should be valid.