maybe it looks like this
Microsoft.SharePoint.SPException ---> System.Runtime.InteropServices.COMException: <nativehr>0x80070001</nativehr><nativestack></nativestack>
anyway, the problem might be that you changed context, you're in a handler (Ajax request), or moved references of SPContext or SPSite to a mehtod, or opened a new site and web.
the 2 methods above, GetList or GetListFromUrl, usually will work with non-100%-complete parameters, like "/Pages", but with the context a bit changed it must have the 100% parameters.
the GetListFromUrl just need "/Forms/AllItems.aspx" in the end, while the GetList need the full url, so try this:
and if your "url part" is just "/Pages" add web url like this:
web.GetList[site.MakeFullUrl(web.ServerRelativeUr + "url part")]