# Encountering Bug in Handcalcs Demo and Issues with a borged state of the package environment

**URL:** <https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147>\
**Category:** New to Julia\
**Tags:** pluto, error-message, unitful\
**Created:** [November 24, 2026, 10:46am UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147 "2026-11-24T10:46:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Geegee](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@Geegee](https://discourse.julialang.org/u/Geegee)\
**Post date:** [November 24, 2026, 10:46am UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/1 "2026-11-24T10:46:01Z")

</div>

What happened (the time is important, as the problem depends on the execution, so there seems to be some problems not only with the package, but also with the way environments are built).

First I tried the example notebook [Handcalcs.jl](https://featured.plutojl.org/math/handcalcsdemo)  
which has a bug ([ERROR: LoadError: ParseError:# Error @ /home/runner/.julia/packages/Unitful/sx - Pastebin.com](https://pastebin.com/fT9WJqYz))

After that I thought, well let’s just see which package is creating the error.  
I created a new notebook with only Unitful and Handcalcs, which worked, after I added StructuralUnits package the issue started to occur, but even after removing it, closing the notebook, restarting everything the problem was still there now and it is not going away anymore.

Woud love to know what you do in these kind of cases.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [November 24, 2026, 11:21am UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/2 "2026-11-24T11:21:18Z")

</div>

That looks interesting, because for the original code lines

> <https://github.com/JuliaPhysics/Unitful.jl/blob/792bb46b8af91001951a2768a043d53714adb923/src/logarithm.jl#L127-L128>

a difference to your error message is that their `Base.:*` is `Base. *` in your error message (and the reason for the error message).  
I am a bit unsure where that difference / change comes from, but if something changed the code file, then it would explain why the error persists.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [November 24, 2026, 1:12pm UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/3 "2026-11-24T13:12:15Z")

</div>

Oh, I think I found something interesting. You are running Unitful 1.23 (my code above is from the most recent 1.29). and there

> <https://github.com/JuliaPhysics/Unitful.jl/blob/1a6fccb174afb15064ba3193a1891260ed8ca99e/src/logarithm.jl#L127-L128>

we have that old code and it seems older Julia versions allowed that.

StructuralUnits.jl is already on 0.3.0 on their main branch which would allow for newer versions, so maybe we should ask them to register that.  
Or we should check what keeps the notebook on Unitful 1.23. Fixing that should fix your error (and we should let the notebook owner/hoster know).  
All I could find about this is the change here [Remove extra space in definition of `Base` methods - Pull Request #817 - JuliaPhysics/Unitful.jl - GitHub](https://github.com/JuliaPhysics/Unitful.jl/pull/817), but not where the Julia parser changed to no longer accepting the space. I personally always wrote the `:*` as far as I can remember.

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [November 24, 2026, 1:51pm UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/4 "2026-11-24T13:51:00Z")

</div>

> [@kellertuer](#):
>
> [StructuralUnits.jl](https://juliaregistries.github.io/General/packages/redirect_to_repo/StructuralUnits) is already on 0.3.0 on their main branch which would allow for newer versions, so maybe we should ask them to register that.

So, until it is registered, you may be able to work around the issue by installing it from the main branch using the following command:

```plaintext
pkg> add StructuralUnits#main

```

or

```julia
import Pkg; Pkg.add(url="https://github.com/co1emi11er2/StructuralUnits.jl", rev="main")

```

---

<div class="post-metadata">

**Author:** ![Geegee](https://avatars.discourse-cdn.com/v4/letter/g/b19c9b/32.png) [@Geegee](https://discourse.julialang.org/u/Geegee)\
**Post date:** [November 24, 2026, 2:13pm UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/5 "2026-11-24T14:13:21Z")

</div>

do you know how can I do this within Pluto? It complains that if I use Pkg that it overwrites Pluto’s handling of the packages.

---

<div class="post-metadata">

**Author:** ![kimikage](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kimikage/32/14534_2.png) [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Post date:** [November 24, 2026, 2:55pm UTC](https://discourse.julialang.org/t/encountering-bug-in-handcalcs-demo-and-issues-with-a-borged-state-of-the-package-environment/143147/6 "2026-11-24T14:55:36Z")

</div>

```julia
begin
	import Pkg
	Pkg.activate(mktempdir())
	Pkg.add(url="https://github.com/co1emi11er2/StructuralUnits.jl", rev="main")
	Pkg.add("Handcalcs")
	Pkg.add("PlutoUI")
	Pkg.add("LaTeXStrings")
	Pkg.add("PlutoPlotly")
	Pkg.add("Markdown")
	Pkg.add("TestHandcalcFunctions")
	
	using Handcalcs, StructuralUnits, PlutoUI, LaTeXStrings, PlutoPlotly, Markdown, TestHandcalcFunctions
end

```

> **[Pattern: The “Pkg cell” - 📦 Packages: advanced – Pkg.activate in a cell](https://plutojl.org/en/docs/packages-advanced/#pkg-cell)**
>
> Pluto’s package manager is enabled for all users, for ease of use and to promote reproducibility in scientific computing. There is no option to disable the behaviour globally (for your entire Pluto session). Instead, Pluto will detect notebooks that...

Or:

> **[Advanced: edit the notebook environment - 📦 Packages: advanced – Pkg.activate in...](https://plutojl.org/en/docs/packages-advanced/#activate_notebook_environment)**
>
> Pluto’s package manager is enabled for all users, for ease of use and to promote reproducibility in scientific computing. There is no option to disable the behaviour globally (for your entire Pluto session). Instead, Pluto will detect notebooks that...
