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

remove_corrupt_utf8! giving "no method matching zero" error #68

Closed
tk3369 opened this issue Feb 4, 2018 · 1 comment
Closed

remove_corrupt_utf8! giving "no method matching zero" error #68

tk3369 opened this issue Feb 4, 2018 · 1 comment

Comments

@tk3369
Copy link

tk3369 commented Feb 4, 2018

This seems to be strange error. I looked up preprocessing.jl file but I could not find any reference to zero function. Instead, the code clearly uses zeros. Is it some kind of compatibility/installation issue?

https://github.com/JuliaText/TextAnalysis.jl/blob/v0.2.1/src/preprocessing.jl#L46

How to reproduce:

julia> sd = StringDocument("With the market providing strong extensions over the last several months, we had to review our shorter-term targets for the bull market which began in 2009. During this past week, almost every bounce we saw was corrective in nature, which mainly kept me viewing the market as being in a weak posture, signaling that we will likely test the 2796 level on the S&P 500(^GSPC). While it seems I may have wrongly given the bull market the benefit of the doubt last weekend, as the pullback we expected has now broken below the 2800 region support we cited last weekend, this break of support makes the much stronger immediate bullish expectation much less likely.")
A TextAnalysis.StringDocument

julia> remove_corrupt_utf8!(sd)
ERROR: MethodError: no method matching zero(::Type{Char})
Closest candidates are:
  zero(::Type{Base.LibGit2.GitHash}) at libgit2/oid.jl:106
  zero(::Type{Base.Pkg.Resolve.VersionWeights.VWPreBuildItem}) at pkg/resolve/versionweight.jl:82
  zero(::Type{Base.Pkg.Resolve.VersionWeights.VWPreBuild}) at pkg/resolve/versionweight.jl:124
  ...
Stacktrace:
 [1] remove_corrupt_utf8(::String) at /home/ec2-user/.julia/v0.6/TextAnalysis/src/preprocessing.jl:46
 [2] remove_corrupt_utf8!(::TextAnalysis.StringDocument) at /home/ec2-user/.julia/v0.6/TextAnalysis/src/preprocessing.jl:58

julia> versioninfo()
Julia Version 0.6.2
Commit d386e40c17 (2017-12-13 18:08 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
@aviks
Copy link
Member

aviks commented Feb 4, 2018

This was fixed in #64, but I haven't tagged a release since.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants