plotting focal mechanisms with pygmt - fig.meca() attributeerror
hi!

i am a newbei to pygmt and was going through a couple of tutorials. i came across the fig.meca functionality here:

[image]

[focal mechanisms — pygmt](https://www.pygmt.org/v0.2.1/gallery/plot/meca.html#sphx-glr-download-gallery-plot-meca-py)

but the provided source code will result in the following error:

attributeerror: ‘figure’ object has no attri…
ha, instead of updating it, i reinstalled the entire package and it’s all working fine now! sorry for the faff.
that error happens when there's no handle to close. i see you call the 'open()' and you're not getting an object reference error before closehandle(). check your memory.pointerwrite() function to make sure it's not doing a closehandle() prematurely. it sounds like you're calling closehandle() twice. hi [@gianna.demetroulakos](/u/gianna.demetroulakos),

as mentioned by [@william.coulson](/u/william.coulson), the object reference not set to an instance of an object normally occurs when a variable is null.

run the code in the debug mode.

when the error occurs, check the variable which has a null value in locals tab.

warm regards,

ranjith u… For a long time HtmlAgilityPack [didn't had the ability to directly query an attribute value](http://htmlagilitypack.codeplex.com/Thread/View.aspx?ThreadId=1720). You had to loop over the list of meta nodes. Here's one way - 



```
var doc = new HtmlDocument();
doc.LoadHtml(htmlString);

var list = doc.DocumentNode.SelectNodes("//meta"); 
foreach (var node in list)
{
    string content = node.GetAttributeValue("content", "");
}

```

But looks like in there is an [experimental xpath release](http://htmlagilitypack.codeplex.com/releases/view/46681) that will let you do that. 



```
doc.Document.SelectNodes("//meta/@content") 

```

will return a list of HtmlAttribute objects. thanks for getting back to me [@michel1](/u/michel1)! in this case, i recommend you to contact our support team: [how to contact our support team ✉](https://forum.asana.com/t/how-to-contact-our-support-team/87774). unfortunately i don’t have the tools in the forum to check what’s causing the error in your screenshot but our support team should be able to assist here.

when you c… double click in the figure to bring up the property inspector. make sure the units property is "pixels". then in the position property (expand it to see width and height), type in 900 for the width, and 100 for the height. if that still doesn't work, make sure the resize property is set to "on". see: <https://feedback.photoshop.com/conversations/lightroom-classic/lightroom-classic-when-trying-to-add-files-to-collections-i-get-this-error-0-attempt-to-compare-two-nil-values/5f9091ea35f40c2520b9ecc4> solution to my problem.

install python enabling framework and then do the rest of the installation as defined

python\_configure\_opts="--enable-framework" pyenv install 3.6.8

the issue was with wx and the need for a framework

when running a simple ws app

import wx

app = wx.app(false) # create a… i used a a plugin called [sw rescue my model](https://forums.sketchup.com/t/144-mb-model-went-blank-cant-find-model-axes-or-horizon/89441/5). this is my first time digging into the processing source code so i hope this helps. the problem you are facing is more of a java problem though than a processing one.

by extending pgraphics you would have to replace the renderer implementations to inherit from your subclass(tgraphics) and not pgrap… A segmentation fault in this case probably means you accessed one of the arrays out of bounds. Start up a debugger and keep a watch on your indices.