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

Error in PythoneFfi initialize in windows #12

Open
kondori-reza1990 opened this issue Jul 10, 2023 · 3 comments
Open

Error in PythoneFfi initialize in windows #12

kondori-reza1990 opened this issue Jul 10, 2023 · 3 comments
Labels
bug Something isn't working more information required

Comments

@kondori-reza1990
Copy link

Hi.
I want to run a script in windows release but when run project show an error:

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PathAccessException: Cannot delete file, path = 'C:\Users\kondo\AppData\Roaming\ir.hezare\fishyar/python_ffi/lib/python3.11.zip' (OS Error: The process cannot access the file because it is being used by another process.

, errno = 32)
#0      _checkForErrorResponse (dart:io/common.dart:55:9)
#1      _File._delete.<anonymous closure> (dart:io/file_impl.dart:315:7)
<asynchronous suspension>
#2      PythonFfiCPython.copyPythonStdLib (package:python_ffi_cpython/python_ffi_cpython.dart:47:5)
<asynchronous suspension>
#3      PythonFfiCPythonMixin.initialize (package:python_ffi_cpython_dart/src/python_ffi_cpython_dart_base.dart:312:5)
<asynchronous suspension>
#4      PythonFfi.initialize (package:python_ffi/src/python_ffi_base.dart:26:7)

I do example's steps in my project.
Please help...
Thanks.

@IVLIVS-III
Copy link
Owner

IVLIVS-III commented Jul 10, 2023

Hi @kondori-reza1990 this bug should already be fixed on the current main branch, see #5

I just haven't had the time yet to publish a new version.
If you want to test if the bugfix works on your machine, please specify a git dependency in your pubspec.yaml.

Please note, that you will need to install Python 3.11 on your system at the moment to use the plugin on Windows. Work is being done to support Windows without installing Python 3.11 separately, but this is not completed yet, see #7

@IVLIVS-III IVLIVS-III added bug Something isn't working duplicate This issue or pull request already exists labels Jul 10, 2023
@kondori-reza1990
Copy link
Author

Hi @IVLIVS-III
I change my dependency to git but when i want run project show this error:

../dart_python_ffi-main/packages/python_ffi/lib/src/python_ffi_base.dart(36,51): error GC6690633: No named parameter with the name 'package'. [F:\Programming\Projects\Flutter\FishYar\FishYar\build\windows\flutter\flutter_assemble.vcxproj]
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(242,5): error MSB8066: Custom build for
'F:\Programming\Projects\Flutter\FishYar\FishYar\build\windows\CMakeFiles\4170604e589bdd55daf8e3835ff36b95\flutter_windows.dll.rule;
F:\Programming\Projects\Flutter\FishYar\FishYar\build\windows\CMakeFiles\0b5def20eadabc7bbf2712132dbdc937\flutter_assemble.rule;
F:\Programming\Projects\Flutter\FishYar\FishYar\windows\flutter\CMakeLists.txt' exited with code 1. [F:\Programming\Projects\Flutter\FishYar\FishYar\build\windows\flutter\flutter_assemble.vcxproj]

@IVLIVS-III
Copy link
Owner

@kondori-reza1990 please provide a code snippet that shows how you initialize the python ffi, i.e. the function that contains PythonFfi.initialize(…).

@IVLIVS-III IVLIVS-III added more information required and removed duplicate This issue or pull request already exists labels Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working more information required
Projects
None yet
Development

No branches or pull requests

2 participants