ERROR: Invalid atom . Cannot parse
Summary
I am unable to use the merge command to add new mods, update mods, or clean mods because I am getting the following "ERROR: Invalid atom . Cannot parse" I am not able to remove flags from mods either because I get the same error
Steps to Reproduce
I do not know the exact steps to reproduce. But here are the things I was doing just before I first got the error.
1.) I was looking through the mods I had already downloaded and was enabling local and global flags for each mod as I preferred. This was for about 150-200 mods. (I was following the OpenMW-Modding Expanded Vanilla list here: https://modding-openmw.com/lists/expanded-vanilla/ ).
2.) After enabling the flags, I merged bin/delta-plugin to my prefix
3.) After enabling the flags I wanted and merging delta-plugin, I ran portmod sync
4.) I ran portmod omw_base merge --update --deep @world
(see output below)
5.) I was asked to download three mods from Nexus and I did so
6.) I got ERROR: Invalid atom . Cannot parse
7.) Now whenever I use merge to do anything except for unmerging a mod, I get the same error.
Current Behaviour
I am getting ERROR: Invalid atom . Cannot parse when running the merge command on my prefix.
Expected Behaviour
I should be able to use merge to do more than unmerge mods
Portmod and Prefix Information
portmod omw_base info
Portmod 2.7.0
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Repositories:
LocalRepo(name='python'
sync_type='git'
sync_uri='https://gitlab.com/portmod/python.git'
priority=-999
location='~/.local/share/portmod/repos/python'
auto_sync=True)
Timestamp: 2023-05-12 07:41:53-04:00
Head commit: 7ee2e2a5da781e41a7cee0e972aa2f4ff6d0b1fa
LocalRepo(name='openmw'
sync_type='git'
sync_uri='https://gitlab.com/portmod/openmw-mods.git'
priority=-1000
location='~/.local/share/portmod/repos/openmw'
auto_sync=True)
Timestamp: 2023-11-15 19:21:03-05:00
Head commit: c46ac893dca289999f191ced93120427b8363555
LocalRepo(name='meta'
sync_type='git'
sync_uri='https://gitlab.com/portmod/meta.git'
priority=-1000
location='~/.local/share/portmod/repos/meta'
auto_sync=True)
Timestamp: 2023-03-08 20:50:56-05:00
Head commit: c38df0c0376116472b5abb3a2db2a0c4d2f79702
base/morrowind: 1.6.1820-r3 USE="bloodmoon tribunal"
bin/7z: 22.01
modules/configtool: 0.11.2 USE="grass" MAP="normal specular terrain_normal terrain_specular"
ACCEPT_KEYWORDS = openmw
ACCEPT_LICENSE = * -@EULA
ARCH = openmw
ARCH_VERSION = None
INSTALL_DEST = pkg/{CATEGORY}/{PN}
MODULEPATH = modules
OPENMW_CONFIG_DIR = ~/.config/openmw
PLATFORM = linux
PORTMOD_MIRRORS = https://gitlab.com/portmod-mirrors/openmw/-/raw/master/
PYTHONPATH = ~/.local/share/portmod/omw_base/lib/python
TEXTURE_SIZE = min
USE = -atlasgen atlas bloodmoon sunrays tribunal
TMP_DIR = /tmp/portmod
CACHE_DIR = ~/.cache/portmod
CONFIG_DIR = ~/.config/portmod/omw_base
ROOT = ~/.local/share/portmod/omw_base
Possible fixes
I don't know of any possible fixes within the code.
I have tried identifying/removing the invalid atom by trying to remove flags from some mods and by unmerging some mods.
Specifically I tried:
1.) Since the output (below) had warnings about the solstheim flag for vurts groundcover, the atlas flag for graphic herbalism, and the grass flag for tomb of the snow prince, I tried removed those flags using portmod omw_base -R <flag> -p <mod>
. I don't think removing the flags worked because I got the Invalid atom error. See output below.
2.) I unmerged lougian-scum, the-forgotten-shields-artifacts, and multiple-teleport-marking because I had to manually download files for them during the merge --update
3.) Since I first got the error after "Starting installation of assets-meshes/meteorite-ministry-1.3," I unmerged this mod and the next package to be installed, properly-smoothed-meshes.
After trying these three potential fixes, I am still encountering the error.
Output from commands when I first encountered the bug
portmod sync
Syncing repo meta…
Done syncing rep o meta.
Syncing repo openmw…
Done syncing repo openmw.
Syncing repo python…
Done syncing repo python.
Beginning index update for repo meta
Collecting packages|# |0 Elapsed Time: 0:00:00
Loading package data|██████████████████████████████|1 Time: 0:00:00
Done updating index. |
Beginning index update for repo openmw
Collecting packages| # |437 Elapsed Time: 0:00:00
Loading package data|████████████████████████████|438 Time: 0:00:00
Done updating index. |
Beginning index update for repo python
Collecting packages|# |18 Elapsed Time: 0:00:00
Loading package data|█████████████████████████████|19 Time: 0:00:00
Done updating index. |
portmod omw_base merge --update --deep @world
Calculating Dependencies…
Done!
WARNING: Internal Error: Unable to trace flag solstheim for package land-flora/vurts-groundcover-2.3::openmw::installed
WARNING: Internal Error: Unable to trace flag atlas for package gameplay-misc/graphic-herbalism-1.04-r4::openmw::installed
WARNING: Internal Error: Unable to trace flag grass for package base/tomb-of-the-snow-prince-2.2.2::openmw::installed
These are the packages to be installed, in order:
[fR] assets-meshes/meteorite-ministry-1.3 USE="alternate higher"
[fR] assets-meshes/properly-smoothed-meshes-1.3-r1 USE="beakers inkwell potted-plant textures"
[fR] assets-misc/dunmer-lanterns-replacer-13.2 USE="glow textures-swg"
[FR] assets-misc/lougian-scum-1.2 USE="small-leaves -bubbles"
[ R] assets-misc/morrowind-optimization-patch-15.0 USE="vanilla-textures"
[fR] assets-misc/project-atlas-0.7.2 USE="atlasgen"
[FR] assets-misc/the-forgotten-shields-artifacts-1.3 USE="wraithguard-replacer"
[ R] base/oaab-data-1.15.0 USE="sunrays"
[ R] arch-dungeons/get-wrecked-1.1-r3 USE="bcom uncharted-artifacts"
[ R] creatures-misc/riekling-fix-and-expansion-1.1 USE="bloodmoon-rebalance"
[ N] dev-python/pyffi-2.2.2
[ N] bin/openmw-nif-cleaner-0_p20200904-r2
[FR] gameplay-magic/multiple-teleport-marking-1.3-r2 USE="levelled"
[fR] items-misc/improved-better-skulls-2.6_p1 USE="vanilla-textures -connary-textures"
[ R] land-flora/remiros-groundcover-4.1 USE="mushrooms solstheim"
[ R] land-flora/vurts-groundcover-2.3 USE="-solstheim"
[fR] land-misc/mistify-1.5 USE="replace-vanilla-mist"
[fR] npcs-misc/friends-and-foes-1.6.9 USE="moar"
[ R] npcs-misc/no-more-stage-diving-1.1 USE="talkative-girls"
[fR] quests-misc/welcome-to-the-arena-6.7 USE="fixmaps"
[fR] skies/swg-skies-4.0-r1 USE="concept-art-masser extra-clear-sky extreme-textures moons -rain-particle-mesh"
Total: 21 packages (0 updates, 2 new, 19 reinstalls, 0 removals),
Size of downloads: 7.13272 MiB
solstheim: <missing description>
connary-textures: <missing description>
bubbles: <missing description>
rr-better-ships-and-boats: <missing description>
The following use flag changes are necessary to proceed.
>=land-flora/vurts-groundcover-2.3 -solstheim
# items-misc/improved-better-skulls-2.6_p1::openmw::installed could not satisfy darknut-textures, which is part of the larger clause vanilla-textures darknut-textures connary-textures
>=items-misc/improved-better-skulls-2.6_p1 -connary-textures
# assets-misc/lougian-scum-1.2::openmw::installed could not satisfy large-leaves, which is part of the larger clause bubbles large-leaves small-leaves
>=assets-misc/lougian-scum-1.2 -bubbles
# common/placeholder: blocked by package.mask with the following comment:
# This is a placeholder package, it cannot be installed! Consider contributing! https://portmod.gitlab.io/portmod/dev/index.html
>=arch-dungeons/get-wrecked-1.1-r3 -rr-better-ships-and-boats
Would you like to automatically apply these changes? [Yes/No]: Yes
Adding flag -solstheim to >=land-flora/vurts-groundcover-2.3 in /home/timbo/.config/portmod/omw_base/package.use
Adding flag -solstheim to >=land-flora/vurts-groundcover-2.3 in /home/timbo/.config/portmod/omw_base/package.use
Adding flag -solstheim to >=land-flora/vurts-groundcover-2.3 in /home/timbo/.config/portmod/omw_base/package.use
Adding flag connary-textures to >=items-misc/improved-better-skulls-2.6_p1 in /home/timbo/.config/portmod/omw_base/package.use
Adding flag bubbles to >=assets-misc/lougian-scum-1.2 in /home/timbo/.config/portmod/omw_base/package.use
Adding flag rr-better-ships-and-boats to >=arch-dungeons/get-wrecked-1.1-r3 in /home/timbo/.config/portmod/omw_base/package.use
Making new common packages available to the packaging environment..
.
Checking for restricted-fetch downloads...
Fetch instructions for assets-misc/lougian-scum-1.2::openmw::installed:
Please download the following files before continuing
and move them to one of the following download directories:
/home/timbo/.cache/portmod/downloads
/home/timbo/Downloads
Scum_Retexture_1.2_Alternative_2-42582-1-2.rar
https://www.nexusmods.com/morrowind/mods/42582?tab=files
Fetch instructions for assets-misc/the-forgotten-shields-artifacts-1.3::openmw::installed:
Please download the following files before continuing
and move them to one of the following download directories:
/home/timbo/.cache/portmod/downloads
/home/timbo/Downloads
Wraithguard_Replacer-42112.rar
https://nexusmods.com/morrowind/mods/42112?tab=files&file_id=90313
Fetch instructions for gameplay-magic/multiple-teleport-marking-1.3-r2::openmw::installed:
Please download the following files before continuing
and move them to one of the following download directories:
/home/timbo/.cache/portmod/downloads
/home/timbo/Downloads
MultiMark_-_Mysticism_Balance-44825-1-1.zip
https://www.nexusmods.com/morrowind/mods/44825?tab=files
Would you like to continue? [Yes/No]: Yes
WARNING: 3 source archives could not be fetched automatically. See above messages for manual fetch instructions.
Package installation will not continue until you have manually downloaded the files.
>>> Starting installation of assets-meshes/meteorite-ministry-1.3
Successfully merged 0 packages before failure.
Error occurred when attempting to merge assets-meshes/meteorite-ministry-1.3::openmw::installed
ERROR: Invalid atom . Cannot parse
Output from `portmod omw_base use -R -p
Removing flag <flag> from <mod> in /home/timbo/.config/portmod/omw_base/package.use
Traceback (most recent call last):
File "/home/timbo/.local/lib/python3.10/site-packages/portmod/_cli/use.py", line 56, in use_main
remove_use(args.R, atom)
File "/home/timbo/.local/lib/python3.10/site-packages/portmod/config/use.py", line 415, in remove_use
remove_flag(use_file, atom, flag)
File "/home/timbo/.local/lib/python3.10/site-packages/portmod/parsers/flags.py", line 129, in remove_flag
if atom_sat(Atom(tokens[0]), atom) and flag in tokens:
File "/home/timbo/.local/lib/python3.10/site-packages/portmodlib/atom.py", line 209, in __init__
raise InvalidAtom("Invalid atom %s. Cannot parse" % (atom))
portmodlib.atom.InvalidAtom: Invalid atom . Cannot parse
ERROR: Invalid atom . Cannot parse