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

Cannot extract a file from path #19

Open
stepesdrabes opened this issue Nov 16, 2021 · 5 comments · May be fixed by #20
Open

Cannot extract a file from path #19

stepesdrabes opened this issue Nov 16, 2021 · 5 comments · May be fixed by #20

Comments

@stepesdrabes
Copy link

stepesdrabes commented Nov 16, 2021

I'm facing this issue when I'm trying to generate the icons.

C:\Users\theza\AndroidStudioProjects\reactions_test>icon_font_generator --from=assets/ic
ons --class-name=UiIcons --out-font=assets/fonts/io_icons.ttf --out-flutter=lib/widgets/
icons.dart

Unhandled exception:
Unsupported operation: Cannot extract a file path from a c URI
#0      _Uri.toFilePath (dart:core/uri.dart:2636:7)
#1      new File.fromUri (dart:io/file.dart:248:49)
#2      GenerateCommand.run (file:///C:/Users/theza/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/icon_font_generator-3.1.0/bin/icon_font_generator.dart:111:27)
<asynchronous suspension>
#3      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#4      main (file:///C:/Users/theza/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/icon_font_generator-3.1.0/bin/icon_font_generator.dart:13:5)
<asynchronous suspension>
@RBT22
Copy link

RBT22 commented Nov 21, 2021

Same here, can somebody help, please?

@Yahhi
Copy link

Yahhi commented Nov 24, 2021

The same error. Would appreciate any help

@urusai88
Copy link

I think
https://github.com/rbcprolabs/icon_font_generator/blob/76d8e8e96114c9b40c7b8e031516a1dea6855484/bin/icon_font_generator.dart#L111-L113
should be like

final iconsMap = File.fromUri(tempOutDirectory.uri.resolve(
    path.basenameWithoutExtension(argResults!['out-font']) + '.json'));

Gaurav192 added a commit to Gaurav192/icon_font_generator that referenced this issue Dec 7, 2021
Fixes ScerIO#19
File.fromUri throws UnsupportedError if file doesn't exist
@Gaurav192 Gaurav192 linked a pull request Dec 7, 2021 that will close this issue
@christiankadjo
Copy link

Hello, i have the same problem...No fix yet ?

@JKazimiers
Copy link

JKazimiers commented Jul 26, 2023

Hi, is there any update yet?
I still have the same problem in version 3.2.0.

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

Successfully merging a pull request may close this issue.

6 participants