Jun-14-2022, 02:06 PM
(This post was last modified: Jun-14-2022, 02:06 PM by Led_Zeppelin.)
I install pixie debugger and it installs fine with the commnad
pip install pixiedust
However, when I import it I get the error:
Any help appreciated.
Again, it installs with no problem. But when import it in a program that I wish to debug, the error appears and it is a showstopper.
I am using 64-bit windows 10 and the installed pixiedust is 1.1.19.
Respectfully, LZ
pip install pixiedust
However, when I import it I get the error:
Error:AttributeError Traceback (most recent call last)
Input In [2], in <cell line: 1>()
----> 1 import pixiedust
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\pixiedust\__init__.py:59, in <module>
57 try:
58 from IPython.core.getipython import get_ipython
---> 59 from pixiedust.display import display
60 import pixiedust.services
61 if "display" not in get_ipython().user_ns:
62 #be nice, only set the display variable on the user namespace if it's not already taken
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\pixiedust\display\__init__.py:39, in <module>
36 global displayRunListeners
37 displayRunListeners.append(listener)
---> 39 from .display import *
40 from .chart import *
41 if PD_Environment.hasSpark:
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\pixiedust\display\display.py:186, in <module>
182 def createCategories(self):
183 return []
185 @Logger()
--> 186 class Display(with_metaclass(ABCMeta)):
187
188 #global jinja2 Environment
189 env = PixiedustTemplateEnvironment()
191 def __init__(self, options, entity, dataHandler=None):
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\pixiedust\display\display.py:189, in Display()
185 @Logger()
186 class Display(with_metaclass(ABCMeta)):
187
188 #global jinja2 Environment
--> 189 env = PixiedustTemplateEnvironment()
191 def __init__(self, options, entity, dataHandler=None):
192 self.entity=entity
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\pixiedust\utils\template.py:77, in PixiedustTemplateEnvironment.__init__(self, baseModule)
75 frm = inspect.stack()[1]
76 baseModule = inspect.getmodule(frm[0]).__name__
---> 77 self.env = Environment(loader=PixiedustTemplateLoader(baseModule),extensions=['jinja2.ext.with_'])
78 self.env.filters["oneline"]=lambda s:reduce(lambda s, l: s+l, s.split("\n"), "") if s else s
79 self.env.filters["base64dataUri"]=lambda s: 'data:image/png;base64,{0}'.format(self.getTemplate(s+"#base64").render())
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\jinja2\environment.py:363, in Environment.__init__(self, block_start_string, block_end_string, variable_start_string, variable_end_string, comment_start_string, comment_end_string, line_statement_prefix, line_comment_prefix, trim_blocks, lstrip_blocks, newline_sequence, keep_trailing_newline, extensions, optimized, undefined, finalize, autoescape, loader, cache_size, auto_reload, bytecode_cache, enable_async)
360 self.policies = DEFAULT_POLICIES.copy()
362 # load extensions
--> 363 self.extensions = load_extensions(self, extensions)
365 self.is_async = enable_async
366 _environment_config_check(self)
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\jinja2\environment.py:117, in load_extensions(environment, extensions)
115 for extension in extensions:
116 if isinstance(extension, str):
--> 117 extension = t.cast(t.Type["Extension"], import_string(extension))
119 result[extension.identifier] = extension(environment)
121 return result
File ~\miniconda3\envs\pump-failure-prediction\lib\site-packages\jinja2\utils.py:149, in import_string(import_name, silent)
147 else:
148 return __import__(import_name)
--> 149 return getattr(__import__(module, None, None, [obj]), obj)
150 except (ImportError, AttributeError):
151 if not silent:
AttributeError: module 'jinja2.ext' has no attribute 'with_'
I have googled this error. There seem to be many answers to fix this. I am just looking for the one that is correct. Any help appreciated.
Again, it installs with no problem. But when import it in a program that I wish to debug, the error appears and it is a showstopper.
I am using 64-bit windows 10 and the installed pixiedust is 1.1.19.
Respectfully, LZ