GithubHelp home page GithubHelp logo

Comments (6)

Chriskuei avatar Chriskuei commented on May 31, 2024

Can you provide your code snippet so that we can reproduce the error?

from matchzoo-py.

ZahraGithub avatar ZahraGithub commented on May 31, 2024

Thanks for your fast reply. Of course, here you are:

import torch import matchzoo as mz if __name__ == '__main__': glove_embedding = mz.datasets.embeddings.load_glove_embedding(dimension=50)

UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2273: character maps to <undefined>

I searched this error and found that in embedding.py lines 90 and 96:
with open(file_path, 'r') as f:
could be changed to
with open(file_path, 'r', encoding="utf8") as f:

Do you agree with me?
Although it is interesting that know the reason since we are working on English documents.

Thanks

from matchzoo-py.

Chriskuei avatar Chriskuei commented on May 31, 2024

Hi Zahra,

I tested the code you provided, but no error. Which version of Python do you use? MatchZoo-py only supports Python 3.6+

from matchzoo-py.

ZahraGithub avatar ZahraGithub commented on May 31, 2024

Hi Chris,

Python 3.6.8. Also, I installed matchzoo-py successfully.

from matchzoo-py.

Chriskuei avatar Chriskuei commented on May 31, 2024

You can add encoding="utf-8" by yourself and have a try.

from matchzoo-py.

ZahraGithub avatar ZahraGithub commented on May 31, 2024

Thanks, you are right.

from matchzoo-py.

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.