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

SCWB shows error for missing 'type' info when it's present in the json file #385

Closed
johnmhoran opened this issue Jul 17, 2019 · 5 comments
Closed
Assignees

Comments

@johnmhoran
Copy link
Member

Running the latest release on Windows 10, after running a no-flag scan (not even -i), I tried to import the .json output file and convert to .sqlite and encountered the following error message:

image

However, both the json and csv output files contain an instantiated type column (with file and directory values).

@steven-esser
Copy link
Contributor

steven-esser commented Jul 17, 2019

@johnmhoran You need to run -i at the very least in order for it to work with scancode-workbench.

Running a scancode scan with no flags currently does not include a -i info scan.

@steven-esser
Copy link
Contributor

steven-esser commented Jul 17, 2019

The type it is referring to is actually the file_type attribute in a scan.

Alternatively, we may be able to get away with accepting limited scans without an -i option. I do not think there is a reason to have a dependency on fileinfo information, especially as scancode-toolkit does not run it by default anyway.

@johnmhoran
Copy link
Member Author

Thanks @MaJuRG . 👍

@mjherzog
Copy link
Member

I would find it useful to be able to use the Tree and Table Views with just the Resource Path and (Resource) type data - esp. for large scan datasets. This would help with the Catch-22 case to get a very basic scan for large codebases where a --info scan may be hard to use in WB.

I would argue that the current error message is a bug since the scan in question has the type column. Updating WB to handle this type of file would be an enhancement that can be deferred a bit if it is difficult since the CSV file is easy enough to use in this context.

steven-esser added a commit that referenced this issue Aug 27, 2019
steven-esser added a commit that referenced this issue Aug 27, 2019
steven-esser added a commit that referenced this issue Aug 28, 2019
steven-esser added a commit that referenced this issue Aug 28, 2019
Sucessfully import scanfiles without --info option present #385
@steven-esser
Copy link
Contributor

#387 merged with the fix. Closing this.

@steven-esser steven-esser added this to the Release v3.1.1 milestone Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants