ubermag / help

Repository for raising issues and requesting help on Ubermag
BSD 2-Clause "Simplified" License
11 stars 3 forks source link

'Data' object has no attribute 'drive' #145

Closed ninadjadkar closed 3 years ago

ninadjadkar commented 3 years ago

Hey! I'm very new to the python language. I recently saw the YouTube tutorials of Ubermag and downloaded the workshop folder from Github. Actually, as I opened the animations from the: "workshop-master/workshop-master/dev/animations/exchange" into my laptop and ran the code, there was an error that prevented the interactive animation. I attach a screenshot of the error. A similar error arose when I ran other animation files as well. Kindly suggest what has to be done in this regard.

error1

ninadjadkar commented 3 years ago

I was able to work around this error as shown in the screenshot attached below. Nonetheless, can anyone tell whether this earlier error that came was due to some different version of Python which I'm using?

doubt_cleared

marijanbeg commented 3 years ago

Hi @ninadjadkar, thank you for your question and for using Ubermag. I transferred your issue to our help repository (https://github.com/ubermag/help). This is the repository we monitor regularly and where you can get support from others in the community. Therefore, we would encourage you to raise future issues in this repository.

A year ago, when we delivered the workshop, you could obtain an individual drive from the data object as data.drive(0). However, since then, we changed the interface and use a more Pythonic way of accessing drives - data[0]. The error you got simply means that Ubermag has changed since the workshop on YouTube. Where did you download the notebook from?

ninadjadkar commented 3 years ago

Greetings @marijanbeg ! Thank you for your clarification. I'll surely ask for my further doubts in the help repository. I downloaded the entire workshop repository from https://github.com/ubermag/workshop It has a folder named dev/animations from which I got this particular problem. Regards.

marijanbeg commented 3 years ago

Hi @ninadjadkar, thank you for letting us know. This is the directory where I put the files I used to make VTK files for animations in my presentation. It has not been updated since then. This is why those files are "hidden" in dev directory. Please refer to tutorials directory for up-to-date documentation.

I believe we resolved this issue and I am closing it now. Please feel free to raise other issues if you encounter any problems.