Code Monkey home page Code Monkey logo

Comments (6)

PGjedde avatar PGjedde commented on August 11, 2024

Oh, and I will add that I also downgraded numpy to version numpy=1.23.5

from brightway2.

PGjedde avatar PGjedde commented on August 11, 2024

I will also add, that the same version of Brightway2 (Brightway2 = 2.4.2, and downgraded numpy = 1.23.5) works on a linux server. So the problem seems to be on mine (and colleagues) windows computers.

from brightway2.

n8downs avatar n8downs commented on August 11, 2024

I hit the same problem on a windows machine and worked around it using Docker Desktop and one of Anaconda's Docker images: https://docs.anaconda.com/free/anaconda/applications/docker/

from brightway2.

raphaeljolivet avatar raphaeljolivet commented on August 11, 2024

Any news / workaround on this issue ?

from brightway2.

wolffseb avatar wolffseb commented on August 11, 2024

I have the same issue on a linux machine. Neither downgrading numpy=1.23.5 nor downgrading to brightway2=2.4.2 solved it. Any news?

from brightway2.

cmutel avatar cmutel commented on August 11, 2024

This error comes from mixing Brightway 2 and 2.5. Due to restrictions on the lengths of file paths on Windows, 2.5 introduced a shorter way of creating filenames, including project directory names. To maintain backwards compatibility, I needed to support the older project filenames, so added the column full_hash to the database that stores project names, which marks whether the project directory uses the older, longer full_hash, or the new, shorter value. For example, the default project directory can be one of the following:

  • default.c21f969b
  • default.c21f969b5f03d33d43e04f8f136e7682

This was a stupid design decision, and is fixed in https://github.com/brightway-lca/bw_projects (not yet integrated in Brightway), which just stores the project directory path directly.

The best way to fix this error would be to modify the SQLite schema to make the full_hash optional (all null), or to set a default value of true. However, the ALTER TABLE command in SQLite is limited - we can't just change an existing table, we would need to create a new virtual table with the correct schema, copy the data there, and then use the virtual table to replace the existing one.

Alternatively, you can:

  • Use a different project data directory with the environment variable BRIGHTWAY2_DIR.
  • Delete projects.db. You will need to recreate your projects with set_project, but you won't lose any data. I would recommend renaming it to something like projects.db.backup before deleting it :)
  • Only use Brightway 2.5.

from brightway2.

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.