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

TypeError: vector_text() got an unexpected keyword argument 'direction' #856

Open
3 tasks
chiuhoward opened this issue Dec 21, 2023 · 2 comments
Open
3 tasks
Labels
type:Bug Fix Something isn't working

Comments

@chiuhoward
Copy link

Description

When trying to provide the direction argument in actor.vector_text following https://fury.gl/latest/reference/fury.actor.html#vector-text, I get an unexpected keyword argument.

I am running fury from within a miniconda environment with jupyter notebook.

Code below (which is the example provided in the documentation) works perfectly fine without the direction argument.

Way to reproduce

[If reporting a bug, please include the following important information:]

  • Code example
import os
import os.path as op
import nibabel as nib
import numpy as np

from dipy.io.streamline import load_trk
from dipy.tracking.streamline import transform_streamlines

from fury import actor, window
from fury.colormap import create_colormap

from PIL import Image

scene = window.Scene()
l = actor.vector_text(text='Hello', direction=(0,1,1))
scene.add(l)
window.show(scene)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-2-41aa93e6da7e> in <module>
      1 scene = window.Scene()
----> 2 l = actor.vector_text(text='Hello', direction=(0,1,1))
      3 scene.add(l)
      4 window.show(scene)

TypeError: vector_text() got an unexpected keyword argument 'direction'
  • Relevant images (if any)
    <img width="670" alt="image" src="https://github.com/fury-gl/fury/assets/137316255/481857b8-1e82-46ab-8109-233c60fe10e1”>

  • Operating system and versions (run python -c "from fury import get_info; print(get_info())”)
    {'fury_version': '0.8.0', 'pkg_path': '/Users/howardchiu/miniconda3/envs/pyAFQ/lib/python3.9/site-packages/fury', 'commit_hash': 'b937ff3418e7c64b0fa89921a54c083ff78dc055', 'sys_version': '3.9.18 (main, Sep 11 2023, 08:25:10) \n[Clang 14.0.6 ]', 'sys_executable': '/Users/howardchiu/miniconda3/envs/pyAFQ/bin/python', 'sys_platform': 'darwin', 'numpy_version': '1.24.3', 'scipy_version': '1.9.1', 'vtk_version': '9.3.0', 'matplotlib_version': '3.8.2', 'dipy_version': '1.7.0'}

@chiuhoward
Copy link
Author

Screenshot didn’t get uploaded properly but it’s the same as the code and traceback

image

@m-agour
Copy link
Contributor

m-agour commented Dec 22, 2023

Hello @chiuhoward ,

The Fury version you're using (0.8.0) does not support the direction in vector_text(). Try updating Fury to version 0.9.0 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Fix Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants