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

Copy-pasting parameter values in DB Editor doesn't work in Pivot table (Value) mode. #2993

Open
Tasqu opened this issue Oct 30, 2024 · 0 comments
Labels
bug Something isn't working DB editor TabularView
Milestone

Comments

@Tasqu
Copy link
Member

Tasqu commented Oct 30, 2024

Issue

Trying to copy-paste parameter values in the "Pivot table (Value)" mode doesn't work:
image
Attempting to copy-paste both via the ctrl+c ctrl+v keybinds and the right-click menu throws the following traceback:

Traceback (most recent call last):
  File "C:\Spine-Toolbox\spinetoolbox\spine_db_editor\widgets\spine_db_editor.py", line 381, in paste
    call_on_focused_widget(self, "paste")
  File "C:\Spine-Toolbox\spinetoolbox\helpers.py", line 772, in call_on_focused_widget
    return method()
           ^^^^^^^^
  File "C:\Spine-Toolbox\spinetoolbox\helpers.py", line 138, in new_function
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Spine-Toolbox\spinetoolbox\widgets\custom_qtableview.py", line 161, in paste
    return self.paste_normal()
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Spine-Toolbox\spinetoolbox\widgets\custom_qtableview.py", line 313, in paste_normal
    begin_paste = model.empty_model.begin_paste if hasattr(model, "empty_model") else model.begin_paste
                                                                                      ^^^^^^^^^^^^^^^^^
AttributeError: 'PivotTableSortFilterProxy' object has no attribute 'begin_paste'

Copy-pasting works normally in "Table" view, though.
Might be related to #2988 ?

Also, I seem to remember that one could delete parameter values using the del key, but this also seems to result in a traceback:

QAction::event: Ambiguous shortcut overload: Del

My setup

Windows 11 machine, python via miniconda. Toolbox running in a conda environment with Python 3.12.7 and the following packages:

Package                   Version                        Editable project location
------------------------- ------------------------------ ---------------------------------
affine                    2.4.0
alembic                   1.13.3
ambience2abm              1.1.0                          C:\AmBIENCe2ABM
annotated-types           0.7.0
ArchetypeBuildingWeather  1.1.1                          C:\ArchetypeBuildingModel\src
asttokens                 2.4.1
atlite                    0.2.15.dev6+geb6732a.d20241030 C:\atlite
attrs                     24.2.0
boto3                     1.35.51
botocore                  1.35.51
Bottleneck                1.4.2
cached-property           2.0.1
cads-api-client           1.4.7
cdsapi                    0.7.2
certifi                   2024.8.30
cftime                    1.6.4.post1
chardet                   5.2.0
charset-normalizer        3.4.0
click                     8.1.7
click-plugins             1.1.1
cligj                     0.7.2
cloudpickle               3.1.0
colorama                  0.4.6
comm                      0.2.2
contourpy                 1.3.0
cycler                    0.12.1
dask                      2024.10.0
dataflows-tabulator       1.54.3
datapackage               1.15.4
debugpy                   1.8.7
decorator                 5.1.1
et_xmlfile                2.0.0
executing                 2.1.0
fire                      0.5.0
fonttools                 4.54.1
frictionless              5.18.0
fsspec                    2024.10.0
gamsapi                   48.1.0
GDX2py                    2.2.0
geopandas                 1.0.1
humanize                  4.11.0
idna                      3.10
ijson                     3.3.0
ipykernel                 6.29.5
ipython                   8.29.0
isodate                   0.7.2
jedi                      0.19.1
jill                      0.11.5
Jinja2                    3.1.4
jmespath                  1.0.1
jsonlines                 4.0.0
jsonpointer               3.0.0
jsonschema                4.23.0
jsonschema-specifications 2024.10.1
jupyter_client            8.6.3
jupyter_core              5.7.2
kiwisolver                1.4.7
linear-tsv                1.1.0
locket                    1.0.0
Mako                      1.3.6
markdown-it-py            3.0.0
marko                     2.1.2
MarkupSafe                3.0.2
matplotlib                3.9.2
matplotlib-inline         0.1.7
mdurl                     0.1.2
multiurl                  0.3.2
nest-asyncio              1.6.0
netCDF4                   1.7.2
networkx                  3.4.2
numexpr                   2.10.1
numpy                     1.26.4
openpyxl                  3.1.5
packaging                 24.1
pandas                    2.2.3
parso                     0.8.4
partd                     1.4.2
petl                      1.7.15
pillow                    11.0.0
pip                       24.3.1
platformdirs              4.3.6
progressbar2              4.5.0
prompt_toolkit            3.0.48
psutil                    6.1.0
psycopg2                  2.9.10
pure_eval                 0.2.3
pydantic                  2.9.2
pydantic_core             2.23.4
Pygments                  2.18.0
PyMySQL                   1.1.1
pyogrio                   0.10.0
pyparsing                 3.2.0
pyproj                    3.7.0
PySide6                   6.7.3
PySide6_Addons            6.7.3
PySide6_Essentials        6.7.3
python-dateutil           2.9.0.post0
python-gnupg              0.5.3
python-slugify            8.0.4
python-utils              3.9.0
pytz                      2024.2
pywin32                   308
PyYAML                    6.0.2
pyzmq                     26.2.0
qtconsole                 5.6.1
QtPy                      2.4.1
rasterio                  1.4.1
referencing               0.35.1
requests                  2.32.3
requests-futures          1.0.1
rfc3986                   2.0.0
rich                      13.9.3
rioxarray                 0.17.0
rpds-py                   0.20.0
s3transfer                0.10.3
scipy                     1.14.1
semantic-version          2.10.0
setuptools                75.1.0
shapely                   2.0.6
shellingham               1.5.4
shiboken6                 6.7.3
simpleeval                1.0.1
six                       1.16.0
spine_engine              0.26.0.dev1+g408e5cb           C:\Spine-Toolbox\src\spine-engine
spine_items               0.24.0.dev15+g58a537c          C:\Spine-Toolbox\src\spine-items
spinedb_api               0.33.0.dev7+g34c8ead           C:\Spine-Toolbox\src\spinedb-api
spinetoolbox              0.10.0.dev6+gf8ea1db16         C:\Spine-Toolbox
SQLAlchemy                1.3.24
stack-data                0.6.3
stringcase                1.2.0
tableschema               1.20.11
tabulate                  0.9.0
termcolor                 2.5.0
text-unidecode            1.3
toolz                     1.0.0
tornado                   6.4.1
tqdm                      4.66.6
traitlets                 5.14.3
typer                     0.12.5
typing_extensions         4.12.2
tzdata                    2024.2
unicodecsv                0.14.1
urllib3                   2.2.3
validators                0.34.0
wcwidth                   0.2.13
wget                      3.2
wheel                     0.44.0
xarray                    2024.7.0
xlrd                      2.0.1

It's not an entirely clean environment, I know. Sorry about that.

@Tasqu Tasqu added bug Something isn't working TabularView DB editor labels Oct 30, 2024
@jkiviluo jkiviluo added this to the V1.0 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DB editor TabularView
Projects
None yet
Development

No branches or pull requests

2 participants