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

Using tool #3

Open
groponp opened this issue Mar 18, 2023 · 5 comments
Open

Using tool #3

groponp opened this issue Mar 18, 2023 · 5 comments

Comments

@groponp
Copy link

groponp commented Mar 18, 2023

Dear I'm try using it tool, but not understading as it work, please can guide me with an more clear example?:

I running en run_test.py : ./run_tests.py -m pdb --config data/www/config.yml

and get:

RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

^CTraceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/./run_tests.py", line 169, in
result = done_queue.get()
^^^^^^^^^^^^^^^^
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.11/multiprocessing/queues.py", line 103, in get
res = self._recv_bytes()
^^^^^^^^^^^^^^^^^^
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.11/multiprocessing/connection.py", line 215, in recv_bytes
buf = self._recv_bytes(maxlength)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.11/multiprocessing/connection.py", line 413, in _recv_bytes
buf = self._recv(4)
^^^^^^^^^^^^^
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.11/multiprocessing/connection.py", line 378, in _recv
chunk = read(handle, remaining)
^^^^^

@nk53
Copy link
Owner

nk53 commented Mar 18, 2023

Your Python version is too high for this version of Auto CGUI. The reason is that the multiprocessing module underwent significant changes between 3.7 and 3.9. I don't remember exactly what version of Python I was using at the time, but please retry with either Python 3.7 or 3.8.

@groponp
Copy link
Author

groponp commented Mar 19, 2023

This is running now, it manages to open the firefox browser, but in a few seconds it gives me the following error:
Appending to existing logfile: results.log
PDBBrowserProcess-1 starting reader
Traceback (most recent call last):
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 40, in getitem
return self._container[index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 135, in init_system
browser.fill('pdb_id', pdb_name)
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/driver/webdriver/init.py", line 562, in fill
field = self.find_by_name(name).first
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 56, in first
return self[0]
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 44, in getitem
self.find_by, self.query
splinter.exceptions.ElementDoesNotExist: no elements could be found with name "pdb_id"

PDBBrowserProcess-1 starting glycan
Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 103, in init_system
pdb = self.pdb = test_case['pdb']
KeyError: 'pdb'

PDBBrowserProcess-1 starting 1UBQ with two staples
Exception encountered for job (-1)
Traceback (most recent call last):
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 40, in getitem
return self._container[index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 135, in init_system
browser.fill('pdb_id', pdb_name)
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/driver/webdriver/init.py", line 562, in fill
field = self.find_by_name(name).first
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 56, in first
return self[0]
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 44, in getitem
self.find_by, self.query
splinter.exceptions.ElementDoesNotExist: no elements could be found with name "pdb_id"

Exception encountered for job (-1)
Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 103, in init_system
pdb = self.pdb = test_case['pdb']
KeyError: 'pdb'

Traceback (most recent call last):
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 40, in getitem
return self._container[index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 138, in init_system
browser.attach_file("file", pdb_path)
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/driver/webdriver/init.py", line 562, in fill
field = self.find_by_name(name).first
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 56, in first
return self[0]
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 44, in getitem
self.find_by, self.query
splinter.exceptions.ElementDoesNotExist: no elements could be found with name "file"

Exception encountered for job (-1)
Traceback (most recent call last):
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 40, in getitem
return self._container[index]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Volumes/Galvani/packages/auto_cgui/CGUIBrowserProcess.py", line 292, in run_full
self.init_system(test_case, resume)
File "/Volumes/Galvani/packages/auto_cgui/PDBBrowserProcess.py", line 138, in init_system
browser.attach_file("file", pdb_path)
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/driver/webdriver/init.py", line 562, in fill
field = self.find_by_name(name).first
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 56, in first
return self[0]
File "/Users/macbookpro/miniconda3/envs/autocgui/lib/python3.7/site-packages/splinter/element_list.py", line 44, in getitem
self.find_by, self.query
splinter.exceptions.ElementDoesNotExist: no elements could be found with name "file"

The command that i use: ./run_tests.py -m PDB --config data/www/config.yml

and my config file containing it:
BASE_URL: https://www.charmm-gui.org/
WWW_DIR: /Volumes/Galvani/packages/auto_cgui
USER: "[email protected]"
PASS:

@nk53
Copy link
Owner

nk53 commented Mar 20, 2023

Hmm, well there are probably several things going on here.

  1. The code in this repository is from before CGUI required user logins.
  2. WWW_DIR and USER/PASS configuration parameters assume you have a local copy of the CGUI code base. Since CGUI is closed source (sorry, it's not my call) these settings was only meant to be used by CGUI developers. You can still use Auto CGUI, just don't set those parameters to anything.

If you give me a few hours, I can update the repository here to handle the new user login scheme and for compliance with Python 3.8+ multiprocessing.

@nk53
Copy link
Owner

nk53 commented Mar 20, 2023

I updated the repository to include previously private changes, which includes login handling and a more useful README.

Someday, I will describe most of the test case options in the README, but that will take a while and I have other things to do.

@nk53
Copy link
Owner

nk53 commented Mar 20, 2023

Please see the version tagged v2.0.

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