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

File not found error in validator call in sbol3 to 2 conversion #300

Open
JMante1 opened this issue Sep 10, 2024 · 6 comments
Open

File not found error in validator call in sbol3 to 2 conversion #300

JMante1 opened this issue Sep 10, 2024 · 6 comments

Comments

@JMante1
Copy link

JMante1 commented Sep 10, 2024

sbol_utilities\conversion.py", line 237, in convert3to2
result = doc2.validate()
sbol2\document.py", line 831, in validate
response = validate(self, config.options)
sbol2\document.py", line 1128, in validate
result = do_validation(json_request)
sbol2\validator.py", line 174, in do_validation
result = run.execute()
sbol2\validator.py", line 64, in execute
output = subprocess.check_output(command, universal_newlines=True, stderr=subprocess.STDOUT)
subprocess.py", line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
subprocess.py", line 501, in run
with Popen(*popenargs, **kwargs) as process:
subprocess.py", line 947, in init
self._execute_child(args, executable, preexec_fn, close_fds,
subprocess.py", line 1416, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

@jakebeal
Copy link
Contributor

I need more information than this to be able to reproduce and debug the error.

@JMante1
Copy link
Author

JMante1 commented Sep 10, 2024

I can give you this code and the file being read in but not sure it will necessarily help you reproduce the error:

`from sbol_utilities import conversion
import sbol3

doc3 = sbol3.Document()
doc3.read("SBOL.xml")
doc2 = conversion.convert3to2(doc3)`

I have attached it but renamed it as json.
SBOL.xml.json

@JMante1
Copy link
Author

JMante1 commented Sep 11, 2024

@jakebeal
Copy link
Contributor

I was not able to reproduce the error, though I did get a validation error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/jbeal/Library/Python/3.9/lib/python/site-packages/sbol_utilities/conversion.py", line 239, in convert3to2
    raise ValueError(f'Conversion from SBOL3 to SBOL2 produced an invalid document: {result}')
ValueError: Conversion from SBOL3 to SBOL2 produced an invalid document: Invalid. sbol-10403: Strong Validation Error: The encoding property of Sequence is REQUIRED and MUST contain a URI. Reference: SBOL Version 2.3.0 Section 7.6 on page 20 : http://sbols.org/unspecified_namespace/Bigger_toolkit_seq  Validation failed.

This capability is known to work on windows - it's part of the standard CI testing, so my suspicion is that it's likely to be something to do with the differences between your installation environment and the GitHub Windows test environment.

What versions of the libraries do you have installed?
According to pip, I am running

sbol-utilities                1.0a17
sbol2                         1.4.1
sbol3                         1.1

@JMante1
Copy link
Author

JMante1 commented Sep 12, 2024

I am using those same versions. Maybe something else installed is interferring?

@jakebeal
Copy link
Contributor

This error makes me think that it's not being able to find the binary required to be installed by the converter.

I notice that your error says "sbol_utilities\conversion.py", a relative path, rather than an absolute path in the installed site packages. Did you pip install the package, and is that what's actually being run?

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

2 participants