Coder Social home page Coder Social logo

Comments (11)

PekkaSavolainen avatar PekkaSavolainen commented on June 16, 2024

Anaconda environments are not supported (see Readme.md Troubleshooting section). Please use miniconda or venv.

from spine-toolbox.

PekkaSavolainen avatar PekkaSavolainen commented on June 16, 2024

Anaconda was not to blame here because this seems to happen with miniconda and venv as well. BUT this happens only on a single system that I know of so far. It seems that nobody else is able to reproduce this. Things tried so far include, upgrading requirements, recloning the repo, trying different Python versions, reinstalling PySide6. trying PySide 6.5.1.1.

Steps to reproduce:

  • Make a new project
  • Make an Importer
  • Make a Data Connection
  • Add an Excel file to Data Connection
  • Connect Data Connection to Importer
  • Double-click importer and select Excel
  • Click on a sheet name in Source tables -> Crash

And here's the traceback

(toolboxv10) C:\Users\ICourt\Spine-Toolbox>python -m spinetoolbox
TypeError: print_exception(): Exception expected for value, str found
 
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ICourt\Spine-Toolbox\src\spine-items\spine_items\importer\widgets\import_mappings.py", line 164, in _change_flattened_mappings
    if not current.isValid():
  File "C:\Users\ICourt\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 413, in parent
    index_item = index.internalPointer()
  File "C:\Users\ICourt\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 413, in parent
    index_item = index.internalPointer()
  File "C:\Users\ICourt\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 413, in parent
    index_item = index.internalPointer()
  [Previous line repeated 1 more time]
  File "C:\Users\ICourt\Spine-Toolbox\src\spine-items\spine_items\importer\mvcmodels\mappings_model.py", line 378, in index
    raise RuntimeError("Cannot create index.")
RuntimeError: Cannot create index.

Any ideas what could be the cause here?

from spine-toolbox.

PekkaSavolainen avatar PekkaSavolainen commented on June 16, 2024

Issues #2121 and #2119 must be related. Almost identical tracebacks.

from spine-toolbox.

PekkaSavolainen avatar PekkaSavolainen commented on June 16, 2024

@sjvrijn Did you find a solution or a reason for #2121 and #2119? This seems to be the same issue here.

EDIT
This may be related to Windows 11. @sjvrijn Are you on Win11?

from spine-toolbox.

sjvrijn avatar sjvrijn commented on June 16, 2024

Haven't found a solution, and I'm indeed running Windows 11. I'll see if I can reproduce this on my Windows 10 machine.

from spine-toolbox.

soininen avatar soininen commented on June 16, 2024

Updating PySide6 to 6.5 seems to prevent Toolbox from crashing although there is still a Traceback. However, Importer seems to work otherwise fine so this could be an acceptable workaround for the time being. We should update our requirements accordingly as we currently limit PySide6 to 6.4.

from spine-toolbox.

daspartha avatar daspartha commented on June 16, 2024

Hi, I am new to spine and trying to follow a youtube tutorial by Juha https://www.youtube.com/watch?v=oRwXwV9tuSo.
I am having exactly same issue as indicated by PekkaSavolainen.
I have tried with both excel and csv data. Spinetoolbox crashes when I click on one of the source tables (sheets).
I am using Anaconda with Python 3.9.16 on windows 10.

spine

from spine-toolbox.

e-zaline avatar e-zaline commented on June 16, 2024

Hi @daspartha,
If you have the same traceback, have you tried what was suggested by @soininen, updating PySide 6 to 6.5?
For me it solved the issue.

Updating PySide6 to 6.5 seems to prevent Toolbox from crashing although there is still a Traceback. However, Importer seems to work otherwise fine so this could be an acceptable workaround for the time being. We should update our requirements accordingly as we currently limit PySide6 to 6.4.

from spine-toolbox.

daspartha avatar daspartha commented on June 16, 2024

Hi @e-zaline

I am now using python 3.9.0 instead of the anaconda distribution.
When I update Pyside6 to 6.5 python tells me that spinetoolbox is not compatible with this version of PySide6.

image

I am still facing the same issue as I indicated before. Spinetoolbox crashes when I click on the source table.

from spine-toolbox.

jkiviluo avatar jkiviluo commented on June 16, 2024

For anyone else reading this - the issue went away after updating and then doing a program or computer restart (unsure which one).

from spine-toolbox.

sjvrijn avatar sjvrijn commented on June 16, 2024

I'll see if I can reproduce this on my Windows 10 machine.

I was unable to reproduce #2121 in Windows 10, while still reproducing it in Windows 11, so definitely seems to be a PySide/Windows issue.

Updating PySide6 to 6.5 seems to prevent Toolbox from crashing ...

After upgrading PySide6 to 6.5.1.1, I was no longer able to reproduce #2121. Because the current requirements specify PySide<6.5.0, I had to upgrade it with the following command:

pip install --upgrade --force-reinstall PySide6

I'll make a PR to update the requirements.

from spine-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.