Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

AttributeError: 'ElementTree' object has no attribute 'getiterator'


ainsley31415926

Question

Hi,

Just installed next for the first time, a couple of minutes ago.

What is this error all about?

 

 

equery u net-fs/nfs-utils
Traceback (most recent call last):
 File "/usr/lib/python-exec/python3.9/equery", line 38, in <module>
   equery.main(sys.argv)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/__init__.py", line 356, in main
   loaded_module.main(module_args)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/uses.py", line 306, in main
   output = get_output_descriptions(pkg, global_usedesc)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/uses.py", line 186, in get_output_descriptions
   local_usedesc = pkg.metadata.use()
 File "/usr/lib/python3.9/site-packages/gentoolkit/metadata.py", line 286, in use
   for node in self._xml_tree.getiterator('flag'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'


 

 

 

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

The issue is python3.9, the bug report has the details:

FL-10643 [next]: equery has problems getting the use flags from ebuilds

A workaround would be to install dev-lang/python-3.7.16,then use eselect python list, and eselect python set the [  ] by  python3.7 so it becomes [1]

rj@funtoo-next ~ $ ego query v python
 dev-lang/python| slot|            repo
----------------+-----+----------------
     * 2.7.18-r1|     | python-kit/next
----------------+-----+----------------
        * 3.7.16|   /m| python-kit/next
----------------+-----+----------------
          3.8.16|     | python-kit/next
        * 3.9.16|     | python-kit/next
         3.10.11|     | python-kit/next
rj@funtoo-next ~ $ eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.7
  [2]   python3.9
  [3]   python2.7 (fallback)

 

Edited by cardinal
Link to comment
Share on other sites

  • 0

The problem still occurs if I switch to 3.7, but strangely even though

eselect python list  
Available Python interpreters, in order of preference:
 [1]   python3.7
 [2]   python3.9


I get code from 3.9

equery u nfs-utils   
Traceback (most recent call last):
 File "/usr/lib/python-exec/python3.9/equery", line 38, in <module>
   equery.main(sys.argv)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/__init__.py", line 356, in main
   loaded_module.main(module_args)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/uses.py", line 306, in main
   output = get_output_descriptions(pkg, global_usedesc)
 File "/usr/lib/python3.9/site-packages/gentoolkit/equery/uses.py", line 186, in get_output_descriptions
   local_usedesc = pkg.metadata.use()
 File "/usr/lib/python3.9/site-packages/gentoolkit/metadata.py", line 286, in use
   for node in self._xml_tree.getiterator('flag'):
AttributeError: 'ElementTree' object has no attribute 'getiterator'


 

Whats more

ego query v python

gives

ego query v python
ERROR: Ego encountered an unexpected error: ModuleNotFoundError
ERROR: Full traceback written to /tmp/ego-traceback-2168.txt.


No module named 'appi'Traceback (most recent call last):
 File "/usr/bin/ego", line 120, in <module>
   EgoModule.run_ego_module(action, econfig, args, VERSION)
 File "/usr/share/ego/python/ego/module.py", line 107, in run_ego_module
   mod = loader.load_module()
 File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
 File "<frozen importlib._bootstrap_external>", line 907, in load_module
 File "<frozen importlib._bootstrap_external>", line 732, in load_module
 File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
 File "<frozen importlib._bootstrap>", line 696, in _load
 File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
 File "<frozen importlib._bootstrap_external>", line 728, in exec_module
 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
 File "/usr/share/ego/modules/query.ego", line 8, in <module>
   import appi
ModuleNotFoundError: No module named 'appi'


 

 

Link to comment
Share on other sites

×
×
  • Create New...