Does pystan/stan still have a module for misc? Function for stan_rdump? - pystan

When I import pystan I get this error: ModuleNotFoundError: No module named 'pystan'.
From another forum thread, I now import stan (instead of pystan).
However, the problem happens when I use stan.misc.stan_rdump. The error is: AttributeError: module 'stan' has no attribute 'misc'.
Please advise. Thanks.

Related

error: cannot import non-existent remote object , image import failing

I'm trying to import an existing Linux image. I used the following command
terraform import azurerm_marketplace_agreement.publisher /subscriptions/YOUR-AZURE-SUBSCRIPTION-ID/providers/Microsoft.MarketplaceOrdering/agreements/publisher/offers/offer/plans/plan
But when I run this in pipeline, I'm getting error at every alternate run. The error is
Error: cannot import non-existent remote object
Do I need to do anything special in my script before I run this command?

ImportError: cannot import name 'MultiObjectiveDisplay' from 'pymoo.util.display'

Does anybody know how to solve this ImportError while running the example code?
ImportError: cannot import name 'MultiObjectiveDisplay' from 'pymoo.util.display' (C:\Users\mycomputer\anaconda3\lib\site-packages\pymoo\util\display_init_.py)

import uvicorn could not be resolved

I am trying to create an api with fastapi.
I have installed and imported uvicorn and fastapi. However I get these errors messages:
Exception has occurred: ModuleNotFoundError
No module named 'uvicorn' I have the same error for fastapi.
What shall I do ?
Thanks for your help

Django Rest Framework AttributeError: module 'coreapi' has no attribute 'Client'

I am trying to run tests for api that worked before. Test.py looks like following:
from django.contrib.auth.models import User
from rest_framework import status
from rest_framework.test import APITestCase
class ApiUserTest(APITestCase):
"""
python manage.py test .\apps\api\api_user
API urls:
api_user/login/
api_user/logout/
api_user/register/
api_user/change_password/
"""
def setUp(self):
...
def test_user_register(self):
...
But I'm getting the following error
PS F:\ComputerShop> python manage.py test .\apps\api\api_user
System check identified no issues (0 silenced).
E
======================================================================
ERROR: api.api_user.tests (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: api.api_user.tests
Traceback (most recent call last):
File "C:\Users\Emil\AppData\Local\Programs\Python\Python38\lib\unittest\loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "C:\Users\Emil\AppData\Local\Programs\Python\Python38\lib\unittest\loader.py", line 377, in _get_module_from_name
__import__(name)
File "F:\ComputerShop\apps\api\api_user\tests.py", line 3, in <module>
from rest_framework.test import APITestCase
File "F:\ComputerShop\env\lib\site-packages\rest_framework\test.py", line 123, in <module>
class CoreAPIClient(coreapi.Client):
AttributeError: module 'coreapi' has no attribute 'Client'
I also tried to run tests on a known working project, but they did not start there either.
I've tried to reinstalling the rest framework but it doesn't help. I use virtual environment in the project
To solve this problem you should install next packages:
pip install coreapi pyyaml

error adding golang cobra package with glide

My glide.yaml import section is
import:
- package: github.com/spf13/cobra
I have
import (
"github.com/spf13/cobra"
)
in my code.
but I am getting the error
vendor/github.com/spf13/cobra/command.go:1092: c.lflags.SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)
vendor/github.com/spf13/cobra/command.go:1092: c.Flags().SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)
vendor/github.com/spf13/cobra/command.go:1240: c.parentsPflags.SortFlags undefined (type *pflag.FlagSet has no field or method SortFlags)
couples of issues on cobra repo says that can happen if pflag package is old version but in my case don't have that package installed separately.
any idea what am I doing wrong? thanks in advance!
It was problem with glide cache not updating why old version of pflag package was getting installed. More detailed info: https://github.com/spf13/cobra/issues/420

Resources