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

Unspecified error after fresh install #3

Open
miguel-chang opened this issue Oct 5, 2022 · 1 comment
Open

Unspecified error after fresh install #3

miguel-chang opened this issue Oct 5, 2022 · 1 comment

Comments

@miguel-chang
Copy link

Hi. Got an unspecified error after first initialization of the ENBIOS notebook (see below).

In [1]:
from enbios.bin.script import Enbios
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

enbios = Enbios()


com_error Traceback (most recent call last)
Cell In [1], line 1
----> 1 from enbios.bin.script import Enbios
2 import pandas as pd
3 import seaborn as sns

File ~\Anaconda3\envs\enbios\lib\site-packages\enbios_init_.py:1
----> 1 from .bin.script import Enbios
4 subtech_supported = False

File ~\Anaconda3\envs\enbios\lib\site-packages\enbios\bin\script.py:13
10 from nexinfosys.common.helper import PartialRetrievalDictionary
12 from enbios.common.helper import list_to_dataframe, generate_workbook
---> 13 from enbios.input.data_preparation.lci_to_nis import SpoldToNIS
14 from enbios.input.data_preparation.lcia_implementation_to_nis import convert_lcia_implementation_to_nis
15 from enbios.input.data_preparation.recipe_to_nis import convert_recipe_to_nis

File ~\Anaconda3\envs\enbios\lib\site-packages\enbios\input\data_preparation\lci_to_nis.py:23
21 from io import StringIO
22 import pandas as pd
---> 23 from bw2io.importers.ecospold2 import Ecospold2DataExtractor
24 from enbios.common.helper import list_to_dataframe, generate_json, generate_workbook
27 def generate_csv(o):

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2io_init_.py:47
2 all = [
3 "activity_hash",
4 "add_ecoinvent_33_biosphere_flows",
(...)
41 "UnlinkedData",
42 ]
44 version = (0, 8, 6)
---> 47 from .package import BW2Package
48 from .export import (
49 DatabaseToGEXF,
50 DatabaseSelectionToGEXF,
(...)
53 lci_matrices_to_matlab,
54 )
55 from .backup import (
56 backup_data_directory,
57 backup_project_directory,
58 restore_project_directory,
59 )

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2io\package.py:4
2 from .errors import UnsafeData, InvalidPackage
3 from .validation import bw2package_validator
----> 4 from bw2data import projects
5 from bw2data.logs import get_logger
6 from bw2data.serialization import JsonWrapper, JsonSanitizer

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2data_init_.py:33
29 version = (3, 6, 5)
32 from .configuration import config
---> 33 from .project import projects
34 from .utils import set_data_dir
35 from .meta import (
36 dynamic_calculation_setups,
37 calculation_setups,
(...)
44 weightings,
45 )

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2data\project.py:351
347 self.set_current(_current)
348 return data
--> 351 projects = ProjectManager()
354 @wrapt.decorator
355 def writable_project(wrapped, instance, args, kwargs):
356 if projects.read_only:

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2data\project.py:71, in ProjectManager.init(self)
70 def init(self):
---> 71 self._base_data_dir, self._base_logs_dir = self._get_base_directories()
72 self._create_base_directories()
73 self.db = SubstitutableDatabase(
74 os.path.join(self._base_data_dir, "projects.db"),
75 [ProjectDataset]
76 )

File ~\Anaconda3\envs\enbios\lib\site-packages\bw2data\project.py:122, in ProjectManager._get_base_directories(self)
119 return envvar, logs_dir
121 LABEL = "Brightway2" if sys.version_info < (3, 0) else "Brightway3"
--> 122 data_dir = appdirs.user_data_dir(LABEL, "pylca")
123 logs_dir = appdirs.user_log_dir(LABEL, "pylca")
124 return data_dir, logs_dir

File ~\Anaconda3\envs\enbios\lib\site-packages\appdirs.py:81, in user_data_dir(appname, appauthor, version, roaming)
79 appauthor = appname
80 const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
---> 81 path = os.path.normpath(_get_win_folder(const))
82 if appname:
83 if appauthor is not False:

File ~\Anaconda3\envs\enbios\lib\site-packages\appdirs.py:481, in _get_win_folder_with_pywin32(csidl_name)
479 def _get_win_folder_with_pywin32(csidl_name):
480 from win32com.shell import shellcon, shell
--> 481 dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0)
482 # Try to make this a unicode path because SHGetFolderPath does
483 # not return unicode strings when there is unicode data in the
484 # path.
485 try:

com_error: (-2147467259, 'Unspecified error', None, None)

@CristinaMadrid
Copy link
Member

Thanks Miquel, we have fised a number of things. If you try now, it should be OK!! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants